Play with my 'crops'

Main Menu

install R package without root access(on Linux)

R is a nice compannon for stataitical people.From time to time, I have to install various packages to accomplish some tasks. At my desktop (linux server), I have the root access, the installation is pretty simple,

Post navigation

4 responses to “install R package without root access(on Linux)”

I have used R in Windows for a couple of years, but I just started using R in Linux recently. I followed your instructions above and was able to load the boa package using the install.packages(“boa”) command. I tried the same command with a couple different packages and got error messages:

not sure why, it works for me. here is the output fyi
ps you may have define contriburl or repos in the install.packages()
good luck

repos: character vector, the base URLs of the repositories to use,
e.g., the URL of a CRAN mirror such as
‘”http://cran.us.r-project.org”’.

Can be ‘NULL’ to install from local files (with extension
‘.tar.gz’ for source packages).

contriburl: URL(s) of the contrib sections of the repositories. Use
this argument only if your repository mirror is incomplete,
e.g., because you burned only the ‘contrib’ section on a CD.
Overrides argument ‘repos’. As with ‘repos’, can also be
‘NULL’ to install from local files.

install.packages(‘stringr’)
Installing package(s) into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning in install.packages(“stringr”) :
‘lib = “/usr/local/lib/R/site-library”‘ is not writable
Would you like to create a personal library
~/R/i686-pc-linux-gnu-library/2.14
to install packages into? (y/n) y
— Please select a CRAN mirror for use in this session —
Loading Tcl/Tk interface … done
also installing the dependency ‘plyr’