Whatever you do, don't use "Run As Administrator" to install R
unless you know exactly why and how you plan to fix the resulting mess.
It is normal not to be able to update the library under Program Files. It is not
normal (in my experience) to have problems creating the library under your
Documents directory.
One thing that looks odd with your error message is the presence of slashes
going backward (\) as Windows likes and forward (/) as Mac/Linux prefer. Since
strings in R use backslash as an escape character, this can sometimes indicate
failure to specify the path correctly, but not always. Forward slashes for
directory separators usually work within R even on Windows, which means you
don't need to escape the backslash ("\\")... but this is a sample
of output rather than input so might be just fine.
Alternatively, you may be missing one of
C:/Users/Alejandro/
C:/Users/Alejandro/Documents/
or the permissions on
C:/Users/Alejandro/Documents/R/
might be preventing R from modifying it.
--
Sent from my phone. Please excuse my brevity.
On June 21, 2017 1:30:06 PM PDT, Alejandro Cayetano Casella
<alejandrocasella74 at gmail.com> wrote:>Hi, I want to download the packages into R in my personal computer and
>this is what appears on the screen:
>> utils:::menuInstallPkgs()
>Warning in install.packages(NULL, .libPaths()[1L], dependencies = NA,
>type
>= type) :
> 'lib = "C:/Program Files/R/R-3.4.0/library"' is not
writable
>Error in install.packages(NULL, .libPaths()[1L], dependencies = NA,
>type >type) :
> unable to create ?C:\Users\Alejandro\Documents/R/win-library/3.4?
>In addition: Warning message:
>In dir.create(userdir, recursive = TRUE) :
> cannot create dir 'C:\Users\Alejandro\Documents\R\win-library',
reason
>'No such file or directory'
>
>Can you help me?
>Thank you.
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>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.