writeFindFn2xls {sos} | R Documentation |
Write a findFn
object to an Excel file with sheets for
PackageSum2
, the findFn
table, and the
call
attribute of the findFn
object.
writeFindFn2xls(x, file.=paste(deparse(substitute(x)), 'xls', sep='.'), csv, ...) findFn2xls(x, file.=paste(deparse(substitute(x)), 'xls', sep='.'), csv, ...)
x |
An object of class findFn
|
file. |
Name of Excel file to create. If a file of this name already exists, it will be overwritten. |
csv |
logical: if TRUE, write three *.csv files rather than one *.xls file. Default is FALSE if software is available to write a *.xls file and TRUE otherwise. |
... |
optional arguments to write.csv used if
|
findFn2xls
is an alias for writeFindFn2xls
; both
functions do the same thing.
1. Create the sheets
2. if(csv | !require(RODBC)
| cannot otherwise
create an Excel file) write.csv with names ending '-sum.csv' for
PackageSum2
, '.csv' for the main table, and '-call.csv' for the
call
sheet.
3. Open connection
4. Write the sheets
5. Done.
The name of the file created is returned invisibly.
Spencer Graves with help from Dirk Eddedbuettel, Gabor Grothendiek, and Marc Schwartz.
findFn
,
odbcConnect
,
sqlSave
,
odbcClose
splineSearch <- findFn("spline", maxPages = 1) writeFindFn2xls(splineSearch) findFn2xls(splineSearch, csv=TRUE)