Unable to install package in R - r

I am getting the error below while installing a package:
Warning in install.packages :
unable to move temporary installation ‘E:\R-3.3.2\library\filed603811626\tidytext’ to ‘E:\R-3.3.2\library\tidytext
Please suggest how to resolve this error.

Make sure you install R in your main disk drive (most probably C:/)
This resolves quite a few problems with moving packages that R does when installing.
You can then install all required dependencies with install.packages(c("tm", "tidytext"))

Related

Unable to install 'Velocyto.R' from Github

I am a beginner in R
trying to analyze my scRNA-seq data with velocyto.R in R studio.
Following velocyto tutorial, I tried installing velocyto.R as below:
library(devtools)
install_github("velocyto-team/velocyto.R")
But, an error pops up:
ERROR: compilation failed for package 'velocyto.R'
removing 'C:/Users/USER/Documents/R/win-library/3.6/velocyto.R'
Error: Failed to install 'velocyto.R' from GitHub:
(converted from warning) installation of package ‘C:/Users/USER/AppData/Local/Temp/RtmpukpRFl/file37346a812b86/velocyto.R_0.6.tar.gz’ had non-zero exit status
Is there anyone to face the same problem described above and succeed in resolving it after all?
I desperately need helps!
Thanks
As your error log says C:/..., you probably use Windows. According to velocyto's README it seems that this package runs only on unix-flavored systems with C++11, Open MP, boost, igraph and hdf5c++ libraries.
This can be the problem: read the velocyto's GitHub issue #40, maybe you'll need to run this under WSL...?

Cannot install tsDyn package in RStudio, 'mnormt' doesn't exist

I am trying to install the tsDyn package on my Macbook Pro running MacOSX Catalina version 10.15.2. in RStudio (v.1.3.959), running R (v.4.0.1). I get the following error:
ERROR: compilation failed for package ‘mnormt’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/mnormt’
Warning in install.packages :
installation of package ‘mnormt’ had non-zero exit status
I tried installing 'mnormt' myself, as well as deleted all irrelevant packages manually to get rid of any possible older versions that may be interfering with the 'tsDyn' package, but nothing seems to be working.
The 'tsDyn' package seems to be installing otherwise, but I cannot call the function 'VECM' because it R states that it does not exist.
Any help would be much appreciated.
If you are using Anaconda, inside Environments search for "r-mnormt" and install from there. Also you can try inside RStudio:
install.packages("r-mnormt")
It should work now.

installation of package ‘RCurl’ had non-zero exit status

I am trying to install RCurl on OS X 10.12.6 but get the following error:
Error: package or namespace load failed for ‘RCurl’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/nick/Library/R/3.4/library/RCurl/libs/RCurl.so':
dlopen(/Users/nick/Library/R/3.4/library/RCurl/libs/RCurl.so, 6): Library not loaded: #rpath/libcurl.4.dylib
Referenced from: /Users/nick/Library/R/3.4/library/RCurl/libs/RCurl.so
Reason: image not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Users/nick/Library/R/3.4/library/RCurl’
The downloaded source packages are in
‘/private/var/folders/hx/9xx9fwq91t95k45dzlmzxfy40000gp/T/Rtmp14zSi1/downloaded_packages’
Warning message:
In install.packages("RCurl") :
installation of package ‘RCurl’ had non-zero exit status
This error has been discussed a bit already, but the solutions are all specific to linux and I don't think they are relevant to OS X. I did try installing the homebrew version of curl but that didn't help.
Any ideas? I think that more debugging information would be helpful, but I'm not sure what else to provide.
Thanks in advance!
Nick
If someone face the same problem in Ubuntu just as I do, the solution is run first in terminal:
sudo apt-get install libcurl4-gnutls-dev
Then in R:
install.packages('RCurl')
Looks like it's expecting libcurl.4.dylib in your #rpath.
I think others have encountered the same issue so the solution should be in here somewhere:
brew unlink R solution
Install curl again
In case it is useful for anyone else with this issue, I solved it without having to install the cran binary of R. (I use the homebrew version because it allows you to use faster BLAS options that take advantage of parallelism). Steps were:
Make sure that R doesn't find the homebrew or anaconda versions of curl-config (this will only affect the current R session)
PATH=/usr/bin/:$PATH
Download and install latest version of RCurl from http://www.omegahat.net/RCurl/ (replace <RCURLVERSION> with the current latest version)
wget http://www.omegahat.net/RCurl/RCurl_<RCURLVERSION>.tar.gz
R CMD INSTALL RCurl_<RCURLVERSION>.tar.gz

cannot install R package using install_local on linux server

I have been trying to install "ncdf4" package in R locally for more than two days now. First I tried installing "ncdf4" package with package.install() but it did not work. Afterwards, I downloaded binary file of the package and tried installing it using install_local:
> library("devtools")
> install_local("/path to the package/",quiet=FALSE)
However, this generated following error:
Installation failed: cannot open the connection
Warning message:
In read.dcf(path) :
cannot open compressed file
'/<path_to_the package>/DESCRIPTION', probable reason 'Not a directory'
I also could not install some other packages using install_local(). Can anyone help me out in troubleshooting this error?

Error in running swirl package in R

I am not able to work in swirl package in R. I am able to install the swirl
package correctly. But while giving the library("swirl") command the error comes up.I have tried every thing like I am not able to find the answer of this error on internet. I have reinstalled R complete. I have tried changing directory. But still this error message is coming. Please help.This is the error message:
library("swirl")
Error in get(Info[i, 1], envir = env) :
cannot open file
'C:/Users/Devender/Documents/R/win-library/3.2/httr/R/httr.rdb': No such
file or directory
Error: package or namespace load failed for ‘swirl’
Thanks alot in advance
Try installing httr package. I think it will solve your problem.
You did not say which R version you are using.
Some Swirl packages are not available for few R versions as 3.2.2. You cant even download any courses from Github repositories into the Swirl if Swirl was successfully loaded in R.
You may want to re-install a different version of R to avoid this Swirl issue, and try again.

Resources