If you mean to put a check in to see if the file exists then something
like this would work:

  for(i in 1:3){
    aFile <- paste("file", i, ".dat", sep = "")
    if(file.exists(aFile) == T){
        bb <- read.table(aFile, header = F)
        x11()
        plot(bb)
        dev.off()
    }
  }


If you mean that you want to check to see that it has data in it you
could ammend the if statement to something like 

if(nrow(aFile) > 0)...


HTH, Andy

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to