[R-sig-Debian] How to get write permissions for (lib="~/.R/library") ??

Paul Johnson pauljohn32 at gmail.com
Sat Oct 30 22:49:39 CEST 2010


On Sat, Oct 30, 2010 at 1:34 AM, pragya agarwal <pragya015 at gmail.com> wrote:
> Hi
>
> I am trying to install R-igraph, but when I issue the command :
>
> install.packages("igraph", lib="~/.R/library")
>
> in the R session, I get the following error:
>
> Warning in install.packages("igraph", lib = "~/.R/library") :
>  'lib = "~/.R/library"' is not writable
> Error in install.packages("igraph", lib = "~/.R/library") :
>  unable to install packages

I believe this means something went wrong, and in the past you may
have run something as root or another user.  Or that you have the
library in .R, but the default in Ubuntu deb packaging is not a dot
file, it is R/x86_64-pc-linux-gnu-library.  That's a setting in
/etc/R/Renviron. I have:

R_LIBS_USER=${R_LIBS_USER-'~/R/x86_64-pc-linux-gnu-library/2.12'}
R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library'}

Assuming that .R/library is what you really want to use, just give
yourself permission there.

Below, suppose "username" is you user login name, the one you want to
own the files.

You can re-set the permissions.  This isn't an R thing, it is just a
linux thing.  Open a terminal

# cd
# ls -la .R

That should let you see.

# cd .R
# chown -R username library

"username" will now own library and everything below in it.

PJ

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas



More information about the R-SIG-Debian mailing list