[R] Update of xlsReadWrite package
Hans-Peter
gchappi at gmail.com
Fri Apr 27 15:42:14 CEST 2007
The (*windows only*) xlsReadWrite package has been updated and the new
version is available on CRAN.
xlsReadWrite natively reads and writes Excel files (v97 - 2003).
o Changes from v1.1.1 to v1.3.3 (versions between never really published)
- ROWNAMES-support also for matrices (not only for data.frame)
- explicit rowNames argument in interface.
(stimulated by email Adrian Dusa)
- support for DATE and TIME values: Excel date and/or time values can
be retrieved as ISO-8601 format string.
- Either explicitly with the colClasses entries:
- "isodate" as "YYYY-MM-DD"
- "isotime" as "hh:mm:ss"
- "isodatetime"as "YYYY-MM-DD hh:mm:ss"
- Or for data.frame an eventual date/time type can be automatically
determined from the value(s) of the first Excel row (determined from
the cell formatting as there are no real date types in Excel)
- There are four DATE CONVERSION ROUTINES (taken from pro) which enable
you to work with Excel date/times values:
- dateTimeToStr converts an ole datetime value to a string
- strToDateTime vice versa (depends on local settings)
- dateTimeToIsoStr }
- isoStrToDateTime } independent of local settings
(date/time support stimulated by an email of Gabor Grothendiek)
- new argument "stringsAsFactors = default.stringsAsFactors()"
(proposed by Peter Cock)
Remark: this is a *potentially code breaking change*.
Until now strings have been retrieved as characters.
- new argument "checkNames = TRUE"
(proposed by Peter Cock)
- colClasses entries modified:
- "numeric" and "factor added,
- "rowname" removed (is now a proper argument)
- scalar values will be recycled (proposed by David Kinniburgh)
- if explicit colClasses have not been given, the colClasses will
be determined from the first 16 Excelrows)
(stimulated by email David Kinniburgh)
- empty cells for double columns come now as NA (before it was 0)
- factors now handled in the Delphi (calls R function as.factor)
- matrix output-type otFactor removed (not used)
- fixed NA factors bug (thanks to Mark W. Kimpel)
- range checks disabled again (flexcel needs this)
- some other small fixes
o Function declarations as per v1.3.2
- read.xls( file,
colNames = TRUE,
sheet = 1,
type = "data.frame",
from = 1,
rowNames = NA, colClasses = NA, checkNames = TRUE,
dateTimeAs = "numeric",
stringsAsFactors = default.stringsAsFactors() )
- write.xls( x, file,
colNames = TRUE,
sheet = 1,
from = 1,
rowNames = NA )
- dateTimeToStr( odate, format = "" )
- strToDateTime( sdate )
- dateTimeToIsoStr( odate, isoformat = "YYYY-MM-DD hh:mm:ss" )
- isoStrToDateTime( sdate )
o Download
- CRAN (v1.3.2; from within RGui) or
- http://treetron.googlepages.com/ (v1.3.3)
- direct link to package:
http://treetron.googlepages.com/xlsReadWrite_1.3.3.zip
- direct link to test-/demoscripts:
http://treetron.googlepages.com/xlsReadWrite_TestData_1.3.3.zip
- the testscript is used for our internal "unittests". It will show
you many examples of how to use the package.
Comments and suggestions are welcome.
Hope you enjoy using xlsReadWrite!
--
Regards,
Hans-Peter
More information about the R-help
mailing list