[R] OpenOffice ods spreadsheets in R?

David Winsemius dwinsemius at comcast.net
Sun Jul 10 03:13:13 CEST 2011

On Jul 9, 2011, at 8:49 PM, Martin Rittner wrote:

> I would like to open OpenOffice (LibreOffice) .ods files in R. I've  
> tried the ROpenOffice package from omegahat, but unfortunately, the  
> read.ods() function attempts to use the values of the first column  
> in a worksheet as row names, and thus does not allow duplicates in  
> there (which, even more unfortunately, occur in my files). Also, the  
> function does not allow to forward any other parameters to the  
> called functions, like e.g. row.names=FALSE.
> Another option read.ods() does not offer is choice of the  
> worksheet(s) to open, but that's a minor issue for me.
> Now, I could alter the files to fit the function. I could alter the  
> function itself. But before I do any of that, I wanted to ask if  
> someone has a better idea, another approach to ods-files altogether,  
> maybe?

I'm not getting the same results as you. Duplicates in the first  
column do not seem to be causing problems. If you look at the cod for  
read.ods, you can step through it and modify its behavior to you  
liking. Perhaps you should post a reproducible example and also the  
error messages you are getting.


David Winsemius, MD
West Hartford, CT

More information about the R-help mailing list