search for: methodnum

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

Did you mean: methodname
2011 Nov 17
1
how to read a free text file into individual variables
...ad a configure file showed as below. How can I read the parameter in this text file. How can I read the parameter into each variable in this file ? configinfo<-scan(file(configfile),ok=TRUE,n=-1) scan seems need every line have same column ? configinfo <- readLines(configfile,ok=TRUE,n=-1) methodnum <- unlist(strsplit(configinfo[2],":"))[2] methodname <- unlist(strsplit(configinfo[3],":")) time <- strtrim((unlist(strsplit(configinfo[4],":"))[2]),3) and time is a string "3 " and strtoi(time) failed and is "[1] NA" when time...