search for: spinr

Displaying 1 result from an estimated 1 matches for "spinr".

Did you mean: spin
2010 Dec 06
1
R cmd batch with parameters
...of the maximal elements in each columns and writes it into the output file. I cannot deal somehow with passing the parameters to the function it works from R with the parameters set fixed. I'd really very much appreciate comment where I go wrong and possible solutions. I paste the code below: spinR <- function(){ args<-(commandArgs()) dataVec <- read.table(args[1], sep=" ") attach(dataVec) a<-dim(dataVec) indMax<- 1:a[2] for(i in 1:a[2]){ indMax[i]<-which.max(dataVec[,i]) } write.table(indMax, file=args[2], col.names=FALSE, row.names=...