[R-gregmisc-users] SF.net SVN: r-gregmisc:[1508] trunk/gdata/man/read.xls.Rd
Brought to you by:
warnes
From: <wa...@us...> - 2011-09-20 18:08:17
|
Revision: 1508 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1508&view=rev Author: warnes Date: 2011-09-20 18:08:08 +0000 (Tue, 20 Sep 2011) Log Message: ----------- Improve xls2csv() man page Modified Paths: -------------- trunk/gdata/man/read.xls.Rd Modified: trunk/gdata/man/read.xls.Rd =================================================================== --- trunk/gdata/man/read.xls.Rd 2011-09-20 18:07:45 UTC (rev 1507) +++ trunk/gdata/man/read.xls.Rd 2011-09-20 18:08:08 UTC (rev 1508) @@ -18,8 +18,7 @@ \arguments{ \item{xls}{path to the Microsoft Excel file. Supports "http://", "https://", and "ftp://" URLS.} - \item{sheet}{number of the sheet within the Excel file from which data - are to be read} + \item{sheet}{name or number of the worksheet to read} \item{verbose}{logical flag indicating whether details should be printed as the file is processed.} \item{pattern}{if specified, them skip all lines before the first @@ -86,7 +85,9 @@ # Example specifying exact Perl path for default MS-Windows install of # ActiveState perl iris <- read.xls(xlsfile, perl="C:/perl/bin/perl.exe") + } + \dontrun{ # Example specifying exact Perl path for Unix systems iris <- read.xls(xlsfile, perl="/usr/bin/perl") @@ -94,11 +95,15 @@ # (read.xls automatically calls findPerl so this is rarely needed) perl <- gdata:::findPerl("perl") iris <- read.xls(xlsfile, perl=perl) + } + \dontrun{ # read xls file from net nba.url <- "http://mgtclass.mgt.unm.edu/Bose/Excel/Tutorial.05/Cases/NBA.xls" nba <- read.xls(nba.url) + } + /dontrun{ # read xls file ignoring all lines prior to first containing State crime.url <- "http://www.jrsainfo.org/jabg/state_data2/Tribal_Data00.xls" crime <- read.xls(crime.url, pattern = "State") @@ -107,7 +112,6 @@ con <- xls2csv(crime.url) print(readLines(con, 2)) file.remove(summary(con)$description) - } # Examples demonstrating selection of specific 'sheets' @@ -119,9 +123,14 @@ # see the number and names of sheets: sheetCount(exampleFile) + if( 'XLSX' \%in\% xlsFormats() ) # if XLSX is supported.. + sheetCount(exampleFile2007) + + # show names of shets in the file + sheetNames(exampleFile) if( 'XLSX' \%in\% xlsFormats() ) # if XLSX is supported.. - sheetNames(exampleFile2007) + sheetNames(exampleFile2007) data <- read.xls(exampleFile) # default is first worksheet data <- read.xls(exampleFile, sheet=2) # second worksheet by number This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |