[R] Read many cvs files

2013-01-03 Thread Durant, James T. (ATSDR/DCHI/SSB)
Message: 21 Date: Wed, 2 Jan 2013 16:14:57 +0100 From: Dominic Roye To: R help Subject: [R] Read many cvs files Message-ID: Content-Type: text/plain Hello R helpers, I would like to automate this code for many files of the same type. But I don?t know how to make it. In particular, i do

Re: [R] Read many cvs files

2013-01-02 Thread Yuan, Rebecca
holtman Sent: Wednesday, January 02, 2013 11:58 AM To: Dominic Roye Cc: R help Subject: Re: [R] Read many cvs files You can read the files into a "list" -- you don't want to create unique object names for each one. files <- list.files(..pattern to match files..) results <- lapp

Re: [R] Read many cvs files

2013-01-02 Thread jim holtman
for those > three sheets? > > Thanks, > > Rebecca > > > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of jim holtman > Sent: Wednesday, January 02, 2013 11:58 AM > To: Dominic Roye > Cc: R hel

Re: [R] Read many cvs files

2013-01-02 Thread jim holtman
You can read the files into a "list" -- you don't want to create unique object names for each one. files <- list.files(..pattern to match files..) results <- lapply(files, read.table, header = TRUE) On Wed, Jan 2, 2013 at 10:14 AM, Dominic Roye wrote: > Hello R helpers, > > I would like to aut

[R] Read many cvs files

2013-01-02 Thread Dominic Roye
Hello R helpers, I would like to automate this code for many files of the same type. But I don´t know how to make it. In particular, i don´t know how to read many files each one as an r object with the name of the file. Then a for loop would be sufficient, right? Many thanks and a happy new year.