Skip to content
Prev 102737 / 398500 Next

variables with dynamic names?

Thanks very much for your help.
I found the solution. I created a matrix with Strings and within a loop 
I read the files and processed them

wellInfo <- matrix(nrow = rows, ncol = cols)
for(i in 1:rows) {
    tempRow <- paste(rowString[i], formatC(c(1:cols), flag="0", 
width=2), sep="")
    print(tempRow)
    wellInfo[i,] <- tempRow
}

for(i in 1:rows) {
    for(j in 1:cols) {
        filename <- paste(wellInfo[i,j],".csv",sep="")
        if( file.exists(filename)) {
            file <- read.csv(filename, sep="\t", header=F)
             ...
          }
      }
}

(It was quite simple, but I did not find the "paste" command before...)
If there is something which could be done easier, just let me know.

Ciao,
Antje



Antje schrieb: