Skip to content
Prev 316192 / 398506 Next

importing data

Hi Ray,
Comments below:
On 26 January 2013 09:03, Ray Cheung <ray1728 at gmail.com> wrote:
[snip]
Too complex. Why not just use file.exists directly?
Too complex here too. I suggest something like:

M <- list()
for (i in 1:n) {
if (file.exists(file_name)) M[i] <- read.table(file_name)
}

R gurus don't like for() loops, but they are easy for humans to understand.
If this doesn't work, post the error message.