Failed to download a package from github in Rstudio - r

When I want to download a package from github by Rstudio, the error message is like this:
devtools::install_github("akoyabio/phenoptr")
Downloading GitHub repo akoyabio/phenoptr#HEAD
Error: Failed to install 'phenoptr' from GitHub:
Line starting 'SystemRequir ...' is malformed!
And then I try to download the package to my PC and install package from local position. The error message appear again.
devtools::install_local("D:\phenoptr-master.zip")
Error: Failed to install 'phenoptr-master.zip' from local:
Line starting 'SystemRequir ...' is malformed!
I don't know why this happened. If anyone could give me some advice to solve the problem?
Thank you very much.
Mengfei Wang

The problem was probably caused by a faulty locale setting. Try setting your locale by running
Sys.setlocale("LC_ALL","en_US.UTF-8")
or
Sys.setlocale("LC_ALL","English")
before calling install_github().

Related

Unable to install package Sleuth in R

I've been trying to install the Sleuth package in R all morning and it keeps giving me errors. This is how I tried to install it:
if(!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("DESeq2")
BiocManager::install ("rhdf5")
install.packages("devtools")
devtools:: install_github("pachterlab/sleuth")
I did use the library() command.
I get the following error messages:
Error: object 'h5write.default' is not exported by 'namespace:rhdf5'
Execution halted
ERROR: lazy loading failed for package 'sleuth'
removing 'C:/Users/31625/OneDrive/Documents/R/win-library/4.1/sleuth'
I was having the same issue and found that there's current an open issue on Github discussing this problem.
Currently there is a workaround which was shared in the same issue on Github:
Run git clone https://github.com/pachterlab/sleuth
Remove the last line in ./sleuth/NAMESPACE which is the h5write.default that raises the error during installation - ignore the warning in the first line
Then in R: devtools::install('./sleuth/')
It worked for me while using Linux - ZorinOS and R 4.1.2 but it should work on Windows as well.
Someone also opened a PR to fix the whole issue but it seems they are not updating the package anymore (unfortunately).

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...?

R - can't install package "rgl"

I've followed as many threads as I can on this to resolve, but no luck. Simply can't install R package "rgl". I have Upgraded Ubuntu server 16 to R version 3.3.1.
PuTTY X11 proxy: Unsupported authorisation protocol
Warning in rgl.init(initValue, onlyNULL) :
RGL: unable to open X11 display
Warning: 'rgl_init' failed, running with rgl.useNULL = TRUE
* DONE (rgl)
I've tried these bits of advice:
Error in installing rgl package
error: installation of package ‘rgl’ had non-zero exit status
I have X11 working fine outside R:
http://www.tomsitpro.com/articles/how-to-use-x11-forwarding,2-843.html
but still get the error above.
Thanks for any help,
S.
Ok, this seems to be solved. I was root, after exiting and using:
sudo R
install.packages("rgl")
everything was ok. so it seems you must install as sudo, not root, for everything to go in the right place.
Thanks,
S.
I checked it. Everything seems to work properly... Rscript - screen
But in "related" here I see some questions about error in installing rgl. Take a look e.g. Error in installing rgl package

RNeo4j not installing in RStudio

Tried giving following command in RStudio
devtools::install_github("nicolewhite/RNeo4j")
Got following error
Installing github repo(s) nicolewhite/RNeo4j/master from hadley
Installing nicolewhite/RNeo4j.zip from https://github.com/hadley/nicolewhite/RNeo4j/archive/master.zip
Error: client error: (404) Not Found
Please advice what needs to be done to install the R Driver for Neo4J.
You can try the answer to my question here.
This was it:
devtools::install_git("https://github.com/nicolewhite/RNeo4j")
Hope this works!

Error Installing package from github with devtools

Trying to install the lego package from Github on Windows in R version 3.1.1 gives the following error:
Error in set(new) : cannot change working directory.
I can verify that Rtools in installed fine and find_rtools() returns TRUE. The debug information indicates it find it in the right location.
This error is caused by wrong command.
The standard command for change working director is setwd(new)

Resources