Skip to content

Read many cvs files

4 messages · Dominic Roye, Yuan, Rebecca, 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 <dominic.roye at gmail.com> wrote:

  
    
#
I know that R can read cvs file, but could R read excel files?

For example, in the workbook, I have 3 sheets. How could I read for those three sheets?

Thanks,

Rebecca
 

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of jim 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 <- lapply(files, read.table, header = TRUE)
On Wed, Jan 2, 2013 at 10:14 AM, Dominic Roye <dominic.roye at gmail.com> wrote:
--
Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.

______________________________________________
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.

----------------------------------------------------------------------
This message, and any attachments, is for the intended r...{{dropped:6}}
#
use the XLConnect package to read/write Excel workbooks.  It handles
multiple sheets just fine.

On Wed, Jan 2, 2013 at 12:03 PM, Yuan, Rebecca
<rebecca.yuan at bankofamerica.com> wrote: