Re: [R] How to use For loop to read multiple files

2013-11-20 Thread arun
Hi, I guess the trouble is here: lapply(1:4,function(i) {paste((file_,i,.txt),sep=)}) Error: unexpected ',' in lapply(1:4,function(i) {paste((file_,  lapply(1:4,function(i) {paste(file_,i,.txt,sep=)}) #works #or lapply(1:4,function(i) {paste0(file_,i,.txt,sep=)}) A.K. Hi guys im having

Re: [R] How to use For loop to read multiple files

2013-11-20 Thread arun
I forgot to delete the `sep` from the 2nd option:  lapply(1:4,function(i) {paste0(file_,i,.txt)}) A.K. On Thursday, November 21, 2013 1:43 AM, arun smartpink...@yahoo.com wrote: Hi, I guess the trouble is here: lapply(1:4,function(i) {paste((file_,i,.txt),sep=)}) Error: unexpected ',' in