read ODS files into R
gives you a data.frame per sheet
ODS files are basically a zip file with all the stuff in it. The most important file is contents.xml which contains all the numbers and formulas used in the ODS spreadsheet. this is the only file currently looked at.
it uses the XML package to search through the contents.xml file. http://www.omegahat.org/RSXML/Tour.pdf
returns the sheets as a list of data.frames with each data.frame being the contents of a sheet
accepts the following parameters: - file - filepath to the ods file - sheet - the sheet(s) you want, if left empty it will return all sheets in a list, if only 1 number is given it will return the sheet as a data.frame (not as a list of data.frames) - formulaAsFormula - switch to display formulas as formulas "SUM(A1:A3)" or as the resulting value "3"... or "8".. default=FALSE
returns the number of sheets in the ODS file
accepts the following parameters: - file - filepath to the ods file
From the CRAN with
library(readODS)
From github with the devtools
package WARNING: THIS MAY BE UNSTABLE!
# import devtools
if(!require(devtools)){
install.packages("devtools")
library(devtools)
}
# Remove old version of readODS
detach("package:readODS")
remove.packages("readODS")
# Install new version and load
install_github(repo="readODS", username ="phonixor", ref="master")
library(readODS)
libre office and google docs generated ODS files have been tested and the package contains some test files and uses the testthat package for automated tests
the package has been tested on WIN 7 and UBUNTU 14.04
the XML package has trouble installing on ubuntu as described here: http://stackoverflow.com/questions/20671814/non-zero-exit-status-r-3-0-1-xml-and-rcurl
to fix this enter the following lines in the console: sudo apt-get install libcurl4-openssl-dev sudo apt-get install libxml2-dev
documentation is generated by roxygen2
this package was developed in RStudio and contains Rproj files