[R] Having trouble updating and installing R 3.2.1 and 3.2.2

Keith S Weintraub kw1958 at gmail.com
Tue Oct 27 13:44:47 CET 2015


Jeff et. al (although there are no others so far on this thread).

I finally gave up and decided to use 4.2 below from the "R for Windows FAQ”

_________________________________________________________
4.2 I don’t have permission to write to the R-3.2.2\library directory.

You can install packages anywhere and use the environment variable R_LIBS (see How do I set environment variables?) to point to the library location(s). 

Suppose your packages are installed in p:\myRlib. Then you can EITHER 

set the environment variable R_LIBS to p:/myRlib before starting R


OR use a package by, e.g. 

library(mypkg, lib.loc="p:/myRlib")


You can also have a personal library, which defaults to the directory R\win-library\x.y of your home directory for versions x.y.z of R. This location can be changed by setting the environment variable R_LIBS_USER, and can be found from inside R by running Sys.getenv("R_LIBS_USER"). This will only be used if it exists so you may need to create it: you can use 

dir.create(Sys.getenv("R_LIBS_USER"), recursive = TRUE)


to do so. If you use install.packages and do not have permission to write to the main or site library, it should offer to create a personal library for you and install the packages there. This will also happen if update.packages offers to update packages for you in a library where you do not have write permission. 

There can be additional security issues under Windows Vista and later: See Does R run under Windows Vista?. In particular, the detection that a standard user has suitable permissions appears to be unreliable under Vista, so we recommend that you do create a personal directory yourself. 

_________________________________________________________________________



---
KW



> On Oct 26, 2015, at 9:49 AM, Jeff Newmiller <jdnewmil at dcn.davis.CA.us> wrote:
> 
> I have not used W10, but for quite awhile the *administrator" account (not the hidden one named "Administrator") has merely had the right to "Run As Administrator"... but doing so explicitly is not recommended unless you definitely know what you are doing (in which case you should not be asking for help here). As long as you let the UAC (User Account Control) prompt you at the necessary moments you should not have permissions trouble. If you have followed this advice already then there might be a bug in the installer, but I would have thought I would have seen more complaints by now if it was a bug.
> ---------------------------------------------------------------------------
> Jeff Newmiller                        The     .....       .....  Go Live...
> DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
>                                      Live:   OO#.. Dead: OO#..  Playing
> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
> /Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
> --------------------------------------------------------------------------- 
> Sent from my phone. Please excuse my brevity.
> 
> On October 26, 2015 6:16:47 AM PDT, Keith S Weintraub <kw1958 at gmail.com> wrote:
>> I uninstalled all versions of R on my computer and killed all R
>> directories (I think).
>> 
>> I am wondering that since I “upgraded” to Windows 10 is it possible
>> that I should create a user separate from the administrator account? My
>> previous version of Windows was 7 Home I think. 
>> 
>> Here is a longer version of the error messages that I get.
>> 
>>> install.packages("sm")
>> Installing package into ‘C:/Users/Administrator/My
>> Documents/R/win-library/3.2’
>> (as ‘lib’ is unspecified)
>> --- Please select a CRAN mirror for use in this session ---
>> Warning: unable to access index for repository
>> https://cran.cnr.Berkeley.edu/src/contrib
>> Warning: unable to access index for repository
>> https://cran.cnr.Berkeley.edu/bin/windows/contrib/3.2
>> Warning messages:
>> 1: In normalizePath(path.expand(path), winslash, mustWork) :
>> path[1]="C:/Users/Administrator/My Documents/R/win-library/3.2": Access
>> is denied
>> 2: package ‘sm’ is not available (for R version 3.2.2) 
>> 
>> 
>> Thanks for your help,
>> KW
>> 
>> 
>>> On Oct 25, 2015, at 7:15 PM, Jeff Newmiller
>> <jdnewmil at dcn.davis.CA.us> wrote:
>>> 
>>> I would guess that you ran R as administrator at some point and now
>> you have a permissions problem on your user library. I can't say I know
>> how to fix it, though using administrator mode to fix the permissions
>> is probably hard while using administrator mode to delete the R
>> directory and reinstalling your packages might be easier.
>>> 
>> ---------------------------------------------------------------------------
>>> Jeff Newmiller                        The     .....       .....  Go
>> Live...
>>> DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live
>> Go...
>>>                                     Live:   OO#.. Dead: OO#.. 
>> Playing
>>> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
>>> /Software/Embedded Controllers)               .OO#.       .OO#. 
>> rocks...1k
>>> 
>> ---------------------------------------------------------------------------
>> 
>>> Sent from my phone. Please excuse my brevity.
>>> 
>>> On October 25, 2015 7:50:07 AM PDT, Keith S Weintraub
>> <kw1958 at gmail.com> wrote:
>>>> I get the following error:
>>>> 
>>>> Warning message:
>>>> In normalizePath(path.expand(path), winslash, mustWork) :
>>>> path[1]="C:\Users\Administrator\My Documents/R/win-library/3.2":
>> Access
>>>> is denied
>>>> 
>>>> This may be the first time that I have tried to upgrade R since I
>>>> upgraded my Windows installation (on Parallels on my Mac no less) to
>>>> Windows 10.
>>>> 
>>>> Needless to say when I try to install packages outside of core CRAN
>> I
>>>> have issues.
>>>> 
>>>> Any help is greatly appreciated.
>>>> 
>>>> Thanks much,
>>>> KW
>>>> 
>>>> ______________________________________________
>>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>> PLEASE do read the posting guide
>>>> http://www.R-project.org/posting-guide.html
>>>> and provide commented, minimal, self-contained, reproducible code.
>>> 
> 



More information about the R-help mailing list