i want to upload different sheets from one excel file. does anyone know of a way to do so? (i use read.csv to load the excel but i would like to load form the sheets themselves.) thanks sivan
Sivan Aldor wrote:> i want to upload different sheets from one excel file. > does anyone know of a way to do so?Yes, the "R Data Import/Export" manual knows. Uwe Ligges > (i use read.csv to load the excel but> i would like to load form the sheets themselves.) > thanks > sivan > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Hi, Take a look at read.xls() from gregmisc package. HTH, Kevin On Thu, 19 Aug 2004, Sivan Aldor wrote:> i want to upload different sheets from one excel file. > does anyone know of a way to do so? (i use read.csv to load the excel but > i would like to load form the sheets themselves.) > thanks > sivan > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >-------------------------------- Ko-Kang Kevin Wang PhD Student Centre for Mathematics and its Applications Building 27, Room 1004 Mathematical Sciences Institute (MSI) Australian National University Canberra, ACT 0200 Australia Homepage: http://wwwmaths.anu.edu.au/~wangk/ Ph (W): +61-2-6125-2431 Ph (H): +61-2-6125-7407 Ph (M): +61-40-451-8301
Here is one way to read the "mysheet1" worksheet from the "mydata.xls" file: library(RODBC) z <- odbcConnectExcel("c:\\mydata.xls") myframe <- sqlFetch(z, "mysheet1") close(z) Your data will be in myframe. Thanks to Michael Lapsley and Brian Ripley for the RODBC package. See the "R Data Import/Export" manual for more information. Sivan Aldor wrote:> i want to upload different sheets from one excel file. > does anyone know of a way to do so? (i use read.csv to load the excel but > i would like to load form the sheets themselves.)-- 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
On 19 Aug 2004 at 12:05, Sivan Aldor wrote:> i want to upload different sheets from one excel file. > does anyone know of a way to do so? (i use read.csv to load the excel > but i would like to load form the sheets themselves.) thanks sivanHi Open Excel, go to the sheet, select rectangular area with your data (preferably with abbreviated names in collumn headings), press Ctrl-C, open R, go to command window, type: mysheet <- read.delim("clipboard") read suggested documentation and help pages. Cheers Petr> > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.htmlPetr Pikal petr.pikal at precheza.cz