Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

What is the best way of installing the R package XLConnect in Ubuntu 12.04 x86?

I tried to manually install it via R, using install.packages("XLConnect",dependencies=TRUE), but after half an hour of compiling, when I tried to load it, I got this error:

> require(XLConnect)
Loading required package: XLConnect
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called ‘XLConnect’

I googled for XLConnect Ubuntu but couldn't find any obvious name for the package.

share|improve this question
add comment

2 Answers 2

The way you described is the standard way of installing packages in R. XLConnect should normally install fairly quickly. It may take a while to download the packages as XLConnect is about 1.6MB in size and the dependency XLConnectJars is about 16.5MB in size (you may try different mirrors).

An alternative is to download the source packages (XLConnect & XLConnectJars) from CRAN (http://cran.r-project.org/web/packages/XLConnect/index.html) and then to use install.packages("/path/to/pkg.tar.gz", repos = NULL)

share|improve this answer
add comment

In my case the problem was with default version of java. I've change it few times but forget to update for R. (Although I've using Ubuntu 14.04 x64, the general way of installation/configuration of R is the same)

Installation error snippet:

Make sure you have Java Development Kit installed and correctly registered in R.
If in doubt, re-run "R CMD javareconf" as root.

As You can see the problem was pretty obvious, but I missed it while installation process.

Solution

It's simple. Try this into terminal:

$ sudo R CMD javareconf

then install XLConnect into R:

> install.packages("XLConnect", dependencies=TRUE)

Hope it helps.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.