XinMeng wrote:
> Hello sir:
>
> How can I read data file of EXCEL format from disk("d:\\data.XLS" for
> example)?
>
> I can only read data file of .txt format
> read.delim("d:\\data.txt",header=T,as.is=T),but only EXCEL format is
> available at present.
Here is one way to read it directly:
library(RODBC)
z <- odbcConnectExcel("d:/data.xls")
mydata <- sqlFetch(z, "Sheet1")
close(z)
# Replace Sheet1 with the name of the worksheet to be read.
--
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 452-1424 (M, W, F)
fax: (917) 438-0894
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html