R Error in install.packages : permission denied - r

I'm trying to install packages employing the command install.packages() in Rstudio Version 1.1.453:
R version 3.5.0 (2018-04-23) -- "Joy in Playing"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
with R Version 3.5 in Windows 10:
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 5.0
year 2018
month 04
day 23
svn rev 74626
language R
version.string R version 3.5.0 (2018-04-23)
nickname Joy in Playing
I'm getting the following error:
Error in install.packages :
cannot open file 'C:/Users/Gabriel/Documents/R/win-library/3.5/file19281116cee/Rcpp/doc/Rcpp-attributes.pdf':
Permission denied
Thanks a lot for your help.

I solved it with this answer. It's R is installed as if it needs constant admin privileges. That answer shows the correct way of doing it without running into the problem again.

I ran into same problem, most times it is an antivirus shield issue! Ensure all shields are down, then retry installation.

I had the same problem and it gave me a headache but the Error with : Permission Denied, as you put it across can be solved by checking the antivus. R studio can be blacklisted by the antivirus, so look at the setting. I am using AVG and surely the application was blacklisted. When I removed it from th blacklist, packages were installed successfully

Related

GnuTLS Error -50: Cannot install packages from Github in Rstudio?

The following lines prompt an error (which differs from this question):
library(devtools)
install_github("StatsWithR/statsr") # the same for any other open repos
The error is this:
Error: Failed to install 'unknown package' from GitHub:
Error -50 setting GnuTLS cipher list starting with +VERS-TLS1.3
Then I wanted to work around the problem caused by devtools, so I tried githubinstall, but the error became this:
Error in curl::curl_download(input, tmpFile, mode = "wb", quiet = !showProgress) :
Error -50 setting GnuTLS cipher list starting with +VERS-TLS1.3
It seems obvious that the issue is caused by GnuTLS and I found a similar thread: git/jenkins TLS issue, but I cannot find some hints there.
I also tried install_url, install_local, and install_git, but all failed.
Here is the information of the R I recently upgraded from 3.4.4(2018):
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 4
minor 1.2
year 2021
month 11
day 01
svn rev 81115
language R
version.string R version 4.1.2 (2021-11-01)
nickname Bird Hippie
I have been stuck with devtools and install_github. What can I try next?
I installed the r-base and Rstudio using apt install in an existing container, and the default settings(the default r version is 3.4.4) caused the issues I met, then I purged the r environment and created a new one in a new Docker container following this blog: Running RStudio Server with Docker.

can I force 64bit version installation of R in windows?

I did quite a bit of Google searches without success. when I download and install R in windows 10 64bit I cannot chose 64bit version and the 32bit version is installed. Can I somehow force the installation of the 64bit version of R in Windows? Thanks.
Maybe I talk nonsense and I have the 64 bit version installed? Version gives:
platform i386-w64-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 4
minor 1.2
year 2021
month 11
day 01
svn rev 81115
language R
version.string R version 4.1.2 (2021-11-01)
nickname Bird Hippie
The reason I ask is that when I try to use reticulate it complained about it being 32-bit and I can also only use 4BG, which I think is a 32bit thing?

R installation for Gurobi 9.1.2 does not work with R 4.0.4

As stated in the question: the installation which worked fine in the past seems to be broken. Any ideas how to solve this issue?
There has been a similar issue in the past, but I am not sure, if it is a similar problem. Although the output only states a warning, the installation does not succeed.
See also here
Details
R.version
_ platform x86_64-w64-mingw32 arch x86_64 os mingw32 system x86_64, mingw32 status major 4 minor 0.4 year 2021 month 02 day 15 svn rev
80002 language R version.string R version 4.0.4 (2021-02-15) nickname
Lost Library Book
install.packages("C:/gurobi912/win64/R/gurobi_9.1-2")
Warning in install.packages : package
‘C:/gurobi912/win64/R/gurobi_9.1-2’ is not available for this version
of R
A version of this package for your version of R might be available
elsewhere, see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
When installing the R package for Gurobi, you need to set repos=NULL as #MrFlick already noted in the comments and as is listed in the official Gurobi installation guide for R: https://www.gurobi.com/documentation/9.1/quickstart_windows/r_ins_the_r_package.html

Error installed R library with version 3.6.0 when only version 3.4 is required

I´m trying to install the library ssev: https://cran.r-project.org/web/packages/ssev/index.html
On a machine with R 3.6.0
install.packages("ssev")
And I´m getting the following error:
“unable to access index for repository http://cran.rstudio.com/src/contrib:
cannot open URL 'http://cran.rstudio.com/src/contrib/PACKAGES'”
Warning message:
“package ‘ssev’ is not available (for R version 3.6.0)”
What I do not understand is why I´m getting this error, when the requiered version for this library is 3.4, as shown in CRAN:
The installation does work with a more recent versions of R like 3.6.3, but in the machine I need it I do not have the option to install a newer version.
I'm using R version 3.6.1 and only getting a warning about the using the library. Generally, you can ignore these and it will still work. If it's not, try updating the package and post the results of trying to load the library and also run version to show info on your setup as I did below:
> library(ssev)
Warning messages:
1: In recycle.data(data, FALSE, length(x), units) :
reached elapsed time limit
2: package ‘ssev’ was built under R version 3.6.3
> version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 6.1
year 2019
month 07
day 05
svn rev 76782
language R
version.string R version 3.6.1 (2019-07-05)
nickname Action of the Toes

Two different R versions and invoking of older R version

I recently installed latest version of R(3.3.1) on my mac but somehow the R is still pointing to the old R version which I had. When R is invoked in command line it show the new version but on typing version in R environmnet the older(3.0.2) is shown.
What changes should be made so as to update to newer R version?
Also I deleted previous versions directories from Frameworks.
Additionally probably because of this issue I get an error when I start R studio.
ls /Library/Frameworks/R.framework/Versions/
3.3 Current
===========================
user1#my-mac:~$ R
Error in objects(db.pos, all.names = TRUE) :
2 arguments passed to .Internal(ls) which requires 3
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
....
....
Error in gzfile(file) : invalid 'encoding' argument
During startup - Warning message:
unable to restore saved data in .RData
> version
_
platform x86_64-apple-darwin10.8.0
arch x86_64
os darwin10.8.0
system x86_64, darwin10.8.0
status
major 3
minor 0.2
year 2013
month 09
day 25
svn rev 63987
language R
version.string R version 3.0.2 (2013-09-25)
nickname Frisbee Sailing
In Mac, point rstudio to the newer version of R using the RSTUDIO_WHICH_R environment variable.
export RSTUDIO_WHICH_R=/usr/local/bin/R

Resources