[R] reading .odf spreadsheet into R
Duncan Temple Lang
duncan at wald.ucdavis.edu
Wed Feb 4 14:28:32 CET 2009
Dieter Menne wrote:
> stephen sefick <ssefick <at> gmail.com> writes:
>> I have searched the archives and I did not find the answer to my
>> question. Is there a way to read in a .odf spreadsheet without
>> modification to a .csv file. I am analyzing my classes scores on
>> their first exam, and would like to read the grade book in without
>> converting it to .csv.
> For very simple cases, i.e. only numbers and headers, it is possible to extract
> content.xml from the odf (rename it to .zip to see it), and read the required
> items with package XML. This is very fast and works well for large, but strictly
> structured data.
Indeed. I just put a package ROpenOffice up at
which provides a read.ods() function and can read worksheets
in a workbook, even those that are not rectangular.
This uses the Rcompression package to read the .ods archive.
I'll eventually coordinate it with the same facilities we have
in the RExcelXML and ROOXML packages which do this
and a few other things for xlsx files for Excel.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help