[R] read multi TXT file in R

jim holtman jholtman at gmail.com
Tue Oct 28 03:33:20 CET 2008


for (i in 2:4){
    input <- read.delim(paste('vegetation_', i, '.txt', sep=''))
    ,,,, process the file ....
}

On Mon, Oct 27, 2008 at 6:53 PM, Alessandro
<alessandro.montaghi at unifi.it> wrote:
> Hi All,
>
>
>
> sorry for the question. I have a problem to understand how I could read
> several txt file in R with read.delim
>
>
>
> file: vegetation_2.txt, vegetation_3.txt, vegetation_4.txt, etc etc
>
>
>
> I tried with:
>
>
>
> for (i in 2:4)
>
> {file=paste("vegetation_",i,sep="") <- read.delim
> (file=paste("vegetation_",i,".txt",sep=""))}
>
>
>
> Thanks I need suggestion to start
>
>
>
> ale
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?



More information about the R-help mailing list