Displaying 1 result from an estimated 1 matches for "list_of_names".
2005 Jan 10
2
doing many commands within R
..., so let me greet everyone.
My problem is that I have several thousand data files which I want to
perform a lot of R commands on, which are found in a seperate .R script.
Now, what I did was within the R prompt, I used to read in a list of the
data files.
e.g.
namelist <- readLines("list_of_names",n=-1)
for (i in 1:100) {
k <- function(namelist[i])
write(k,file="outputfile",append=TRUE)
}
Next, I tried automating the R commands by making a loop. Within the
loop I called the R-script. Within ecery single loop R called the R-script
and performs the commands therein (or is...