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? Thanks, Martin
Martin, Look at ROOo on rcom.univie.ac.at It is near the bottom of the Download page. Rich On Sat, Jul 9, 2011 at 8:49 PM, Martin Rittner <kmr@thegeologician.net>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? > > Thanks, Martin > > ______________________________**________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help> > PLEASE do read the posting guide http://www.R-project.org/** > posting-guide.html <http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Just export to a plain text format. I know it's somehow not very satisfying, but really it's the easiest thing to do. Best, Ista On Sat, Jul 9, 2011 at 8:49 PM, Martin Rittner <kmr at thegeologician.net> 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? > > Thanks, Martin > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org
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. David Winsemius, MD West Hartford, CT