user30314
user30314

Reputation: 193

Package installation version error in R

I am trying to install CRAN packages after downloading and unzipping the source files in linux. The packages need to install some dependencies but I got following error, why is this so?

> install.packages("/home/sarah/lubridate", dependencies=TRUE)
Installing package into ‘/home/sarah/R/x86_64-redhat-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
Warning message:
package ‘/home/sarah/lubridate’ is not available (for R version 3.1.0)

P.S I am connecting to the server through SSH and am a sudoer user. I did not use R CMD INSTALL as it needed to install some dependencies as well. Thanks

Upvotes: 0

Views: 301

Answers (1)

James King
James King

Reputation: 6365

From the install.packages help file:

pkgs: character vector of the names of packages whose current versions should be downloaded from the repositories.

      If ‘repos = NULL’, a character vector of file paths of
      ‘.tar.gz’ files.  These can be source archives or binary
      package archive files (as created by ‘R CMD build --binary’).
      On a CRAN build of R for OS X these can be ‘.tgz’ files
      containing binary package archives.  Tilde-expansion will be
      done on the file paths.

So if you want to install from local copies of the libraries it seems you need repos = NULL. I am not clear why you can't use a remote repository in the usual way.

Upvotes: 1

Related Questions