[R] how to read data from MSExcel into R
Gabor Grothendieck
ggrothendieck at gmail.com
Wed Sep 11 16:24:58 CEST 2013
On Wed, Sep 11, 2013 at 9:06 AM, Charles Determan Jr <deter088 at umn.edu> wrote:
> If there isn't multiple sheets you can use the 'gdata' package and
> read.xls().
>
> Otherwise you could re-save the file as a csv file and load that file with
> read.csv() assuming not multiple sheets again which a csv cannot contain.
>
read.xls in gdata does support multiple sheets via the sheet= argument
as well as the sheetCount and sheetNames helper functions.
fn <- "abc.xlsx"
nms <- sheetNames(fn)
lapply(nms, read.xls, xls = fn)
--
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com
More information about the R-help
mailing list