dolbi
我在ultraEdit里写了程序,但是不知道在R里面怎么直接调用的.
那们朋友忙帮一下.谢谢!!
dolbi
library(RODBC);
con=odbcConnect("mysql");
get_gene_family_pos();
get_gene_family_pos=function ()
{
a1=read.table("aa.summary",head=TRUE,sep="\t");
n=1;
while(n<length(a1$bb))
a2=sqlQuery(con,"select count(*) as pos from point_gene_1 where position='a' and familyid='a1$bb[n]'")
posA[n]=a2$pos[1]
n++
}
}
提示:syntax error, unexpected '}' at
rtist
while后面没有加{
bjt
?source
rtist
呵呵,居然写了个n++ 可惜R不认识啊。
btw:在C里面,++n也要比n++快的
dolbi
原来是因为n++啊.
谢谢!!
yihui
这个好玩儿
sheldonpeng
用VB拦截R-console的title,然后模拟快捷键粘帖source(FILE_PATH)。先编译VB成可执行程序,在UltraEdit中设定调用这个程序并在命令行中追加当前编辑文件名。
yihui
楼上是编程的好手
fu_neng
如果是在ultra里写的是R规范程序,直接source即可, 若是c程序,则需编译库程序来调用.
陈放
我写的是c程序,用编译库程序怎么才能调用,谁能举个例子,谢谢.