installing packages with renv - r

I open RStudio and type
install.packages('rJava')
and it works fine.
Then I load package which has renv initialized and try the same command and it returns:
Error: package 'rJava' is not available
In addition: Warning messages:
1: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.
2: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.
>
What might be the reason?
Update
I decided to try something radical:
remove.packages('renv')
it and worked
but then I restarted R sessions and got back
# Bootstrapping renv 0.13.1 --------------------------------------------------
* Downloading renv 0.13.1 ... OK
* Installing renv 0.13.1 ... Done!
* Successfully installed and loaded renv 0.13.1.
Is there way to get rid of renv?
Another update:
I was able to deactivate renv with renv::deactive()

Related

What is the error in "install_github" for using an R Package from github

I am trying to download and use an R Package provided on github (SvenKlaassen/GGMtest). But I receive an error causing the process to stop. I am using windows.This is the error message:
Error: Failed to install 'GGMtest' from GitHub:
(converted from warning) installation of package
'C:/Users/MYUSER/AppData/Local/Temp/RtmpeOALa5/file7d43f52565e/GGMtest_0.1.0.tar.gz' had non-zero
exit status
This seems to be a somewhat common message when searching for the error but I cannot figure out how work this out. The full message is this:
install_github("SvenKlaassen/GGMtest")
Downloading GitHub repo SvenKlaassen/GGMtest#HEAD
During startup - Warning message:
Setting LC_CTYPE= failed
√ checking for file 'C:\Users\MYUSER\AppData\Local\Temp\RtmpeOALa5\remotes7d45119371d\SvenKlaassen-
GGMtest-ddc314d/DESCRIPTION' ...
- preparing 'GGMtest':
√ checking DESCRIPTION meta-information ...
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
- building 'GGMtest_0.1.0.tar.gz'
Error: (converted from warning) Setting LC_CTYPE= failed
Execution halted
Error: Failed to install 'GGMtest' from GitHub:
(converted from warning) installation of package
'C:/Users/MYUSER/AppData/Local/Temp/RtmpeOALa5/file7d43f52565e/GGMtest_0.1.0.tar.gz' had non-zero
exit status
Maybe someone can help!

Ignore SSL when installing packages in R

When I try to install a package like this: install.packages("RGtk2")
I get the following error:
Warning in install.packages :
package ‘RGtk2’ is not available (for R version 3.3.2)
Warning in install.packages :
URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.3/PACKAGES.gz': status was 'SSL connect error'
Warning in install.packages :
URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.3/PACKAGES': status was 'SSL connect error'
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.3:
cannot download all files
How can I disable SSL so that my install goes through? I know that normally this would be bad from a security standpoint, but in this case I'm pretty sure that SSL error happens because there is some corporate proxy server that alters a certificate in some way.

Installing XLConnect package

I was wanting to install XLConnect package so that i could save my databses created from RSQLite in different formats. But when i do
install.packages("XLConnect")
it seems to give error
checking whether Java run-time works... ./configure: line 3747: /usr/lib/jvm/default-java/bin/java: No such file or directory
no
configure: error: Java interpreter '/usr/lib/jvm/default-java/bin/java' does not work
ERROR: configuration failed for package ‘rJava’
* removing ‘/home/mrshekar/R/x86_64-pc-linux-gnu-library/3.4/rJava’
Warning in install.packages :
installation of package ‘rJava’ had non-zero exit status
ERROR: dependency ‘rJava’ is not available for package ‘XLConnectJars’
* removing ‘/home/mrshekar/R/x86_64-pc-linux-gnu-library/3.4/XLConnectJars’
Warning in install.packages :
installation of package ‘XLConnectJars’ had non-zero exit status
ERROR: dependencies ‘XLConnectJars’, ‘rJava’ are not available for package ‘XLConnect’
* removing ‘/home/mrshekar/R/x86_64-pc-linux-gnu-library/3.4/XLConnect’
Warning in install.packages :
installation of package ‘XLConnect’ had non-zero exit status
Now i read on R: rJava package install failing about the
export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre
export PATH=$PATH:$JAVA_HOME/bin
but still the problem seeems to persist. Also if you look at the solution on Error of java path on loading rJava package
sudo R CMD javareconf
It gives the error
*** JAVA_HOME is not a valid path, ignoring
*** Cannot find any Java interpreter
*** Please make sure 'java' is on your PATH or set JAVA_HOME correspondingly
Also for the install JDK answer
apt-get install r-cran-rjava
I get the permission denied error even if i do it on vm-virtual box it gives me permission denied for the ubuntu 18.04 version i have installed and made myself the admin.
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
What should i do? Please help.

R install packages on Github(error)

library(devtools)
install_github('taiyun/recharts')
but R gives me error as follow:
Installation failed: schannel: failed to receive handshake, SSL/TLS connection failed
I don't know why.I think it maybe the network is restriction.

Cannot install rgdal package in R on RHEL6, unable to load shared object rgdal.so

I have AWS RHEL6 server where I've installed (compiled) rgdal 1.9.2 and proj packages. Now in R I want to install rgdal package but it gives this error:
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/Roel/R/x86_64-redhat-linux-gnu-library/3.3/rgdal/libs/rgdal.so':
libgdal.so.1: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/Roel/R/x86_64-redhat-linux-gnu-library/3.3/rgdal’
Warning in install.packages :
installation of package ‘rgdal’ had non-zero exit status
Full install log can be found here.
When I do locate rgdal.so in Linux it doesn't find anything. I can also not find how to get rgdal.so of what it is part of.
Has anyone any idea on how to fix this?
I fixed it:
There is an error further up in the log as well that I had missed because of the error at the end:
./proj_conf_test: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory
libgdal.so.1 was on the system in /usr/local/lib.
I then did:
echo "/usr/local/lib" >> /etc/ld.so.conf.d/R-dependencies-x86_64.conf
ldconfig
This fixed the subsequent error that I mentioned in the OP.
If you see Permission Denied when running Roel's, try:
sudo ldconfig -c "echo '/usr/local/lib' >> /etc/ld.so.conf.d/R-dependencies-x86_64.conf"

Resources