Site icon R-bloggers

Excel Import into R without rJava

[This article was first published on Odd Hypothesis, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
In my ongoing quest to webappify various R scripts I discovered that rApache cannot load any R packages that depend on rJava.  For several of the scripts that I’ve written that grab data out of MS Excel files, and therein use the xlsx package, this is a serious brick wall.

In my current workaround, I’ve resorted to using a shell script to do the xls(x) to .RData conversion.  Then I stumbled upon the gdata package.  Buried deep deep deep within the documentation it is a function called

read.xls()

that relies on Perl rather than Java to do the heavy lifting of crawling both of Microsoft’s proprietary binary and xml based formats.

Testing is currently underway and a comparative write-up is planned.

To leave a comment for the author, please follow the link and comment on their blog: Odd Hypothesis.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.