search for: allsnp

Displaying 2 results from an estimated 2 matches for "allsnp".

2006 Apr 26
2
help in R
...hd/bs871/fram.csv",header=T,sep=",",na.string='') > phen.name <- scan("c:/tina/phd/bs871/fram.csv",nline=1,what="character") Read 1 item > n.phen <- length(phen.name) > > names(phen.dat) <- c("id", phen.name) > > test.allsnp <- function(phen) + + apply(phen.dat[,snp.name],glm.reg,phen=phen) > ##Above:since snp gntp data are defined as factor, use lapply instead of apply(matrix only) > > #Below; apply() results in three dimensional list (phen,snp) > #use unlist to convert the list into a vector, then us...
2006 Jul 23
1
Iterated Data Input/Output with Random Forests
Hi, I am currently writing code to input a few thousand files, run them through the Random Forests package, and then output corresponding results. When I use the code below: zz<-textConnection("ex.lm.out", "w") sink(zz) tempData<-read.delim(paste("allSnps",1,"Phenotype.phn",sep=""),header=TRUE,sep=",",quote="\"",dec=".") tempData[[1]]<-factor(tempData[[1]]) tempData.rf<-randomForest(tempData[[1]]~.,data=tempData,importance=TRUE,proximity=TRUE,outscale=TRUE,replace=TRUE) tempData.rf z...