> ############### stripping off eval, looking for clues > > > > parse(paste('read.xls("Book',nam,'.xls",sheet=1,from=4,colClasses="numer > ic")',sep='')) > > Error in file(file, "r") : unable to open connection > > In addition: Warning message: > > In file(file, "r") : > > cannot open file > 'read.xls("Book1.xls",sheet=1,from=4,colClasses="numeric")', reason > 'Invalid argument' >
Your clue is that it looks like parseis unsuccessfully trying to open a file. Look at ?parse and note the first argument, which you are using because of positional matching. You want eval(parse(text = paste(...))) Best, Erik Iverson ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.