[R] RES: read a xls file
Rodrigo Aluizio
r.aluizio at gmail.com
Sun Jan 18 15:55:04 CET 2009
Hi Michele, there are at least two good alternatives.
xlsReadWrite (read only xls)
RODBC (the one I prefer, read xls and xlsx), odbcConnectExcel (read xls) and
odbcConnectExcel2007 (read xlsx).
The libraries help files bring to you better details.
Here are some examples of file importing (the setwd() is not an obligation):
Library(RODBC)
setwd('C:/Documents and Settings/Administrador/Meus
documentos/UFPR/Micropaleontologia/Potiguar/Monitoramento/Abril2008/')
Data<-odbcConnectExcel('ANOVA-Monit2008.xls',readOnly=T,)
AbioRep<-sqlFetch(Data,'AmbienteRep',colnames=F,rownames='Sample')
AbioMed<-sqlFetch(Data,'AmbienteMed',colnames=F,rownames='Sample')
IndiecesFV<-sqlFetch(Data,'Indices-FV',colnames=F,rownames='Sample')
IndiecesFT<-sqlFetch(Data,'Indices-FT',colnames=F,rownames='Sample')
odbcClose(Dados)
library(xlsReadWrite)
setwd('C:/Documents and Settings/Administrador/Meus
documentos/Artigos/Disserta/')
Abio<-read.xls('AF.xls',sheet=1,rowNames=T)
Bio<-read.xls('AF.xls',sheet=2,rowNames=T)
SAbio<-decostand(Abio,method='standardize')
Hope it helps
___________________________________
MSc. Rodrigo Aluizio
Centro de Estudos do Mar/UFPR
Laboratório de Micropaleontologia
Avenida Beira Mar s/n - CEP 83255-000
Pontal do Paraná - PR - BRASIL
Fone: (0**41) 3455-1496 ramal 217
Fax: (0**41) 3455-1105
-----Mensagem original-----
De: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Em
nome de Michele Santacatterina
Enviada em: domingo, 18 de janeiro de 2009 12:16
Para: R-help at r-project.org
Assunto: [R] read a xls file
Hello,
i have a xls file. I will read it in r, what library-command i use for
this??
any ideas??
Thanks
Michele
[[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.
More information about the R-help
mailing list