Installing package - r

I come across this problem when I install the package
"TxDb.Hsapiens.UCSC.hg19.knownGene" from Bioclite on RStudio v.1.1442. Below is the error message:
Warning messages:
/TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2.tar.gz' had status 3
2: In install.packages(pkgs = doing, lib = lib, ...) :
installation of package ‘TxDb.Hsapiens.UCSC.hg19.knownGene’ had non-zero exit status
I also tried to install this package, but it did not work either:
Warning in install.packages :
package ‘parallel’ is not available (for R version 3.4.3)
Warning in install.packages :
package ‘parallel’ is a base package, and should not be updated
I do not understand what the warnings mean and can someone please help me with resolving this issue?
Thank you.

Some further details would be very helpful - especially the code that you actually used.
What OS are you working on?
Is this a fresh install of R?
Have you previously had TxDB.... installed?
Are you working in a conda environment or similar?
Why did you download the gzipped version of the package?
In a fresh R-3.4.3 environment on Ubuntu I get the following
source("http://www.bioconductor.org/biocLite.R")
## installing source BiocInstaller blah blah success
biocLite("TxDb.Hsapiens.UCSC.hg19.knownGene")
Warning messages:
1: In install.packages(pkgs = doing, lib = lib, ...) :
installation of package ‘RMySQL’ had non-zero exit status
2: In install.packages(pkgs = doing, lib = lib, ...) :
installation of package ‘GenomicFeatures’ had non-zero exit status
3: In install.packages(pkgs = doing, lib = lib, ...) :
installation of package ‘TxDb.Hsapiens.UCSC.hg19.knownGene’ had non-zero exit status
This suggests that if I wanted to install TxDB... I'd have to get RMySQL installed first, and then GenomicFeatures and then ....
Could you post all the code you used and all the contents of the warning messages that you received, please.

Related

Unable to install the disgenet2r package

library(devtools)
install_bitbucket("ibi_group/disgenet2r")
Unable to install dependencies such as SPARQL
ERROR: dependency ‘SPARQL’ is not available for package ‘disgenet2r’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/disgenet2r’
Warning messages:
1: package ‘SPARQL’ 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
2: In i.p(...) :
installation of package ‘/var/folders/43/7hr3j7q17tn0ns1g67l5vbq80000gn/T//Rtmptk5KoF/file2d1b24460f94/disgenet2r_0.99.2.tar.gz’ had non-zero exit status
Installing of library(disgenet2r) for further OMIM research
OK, so, the version of something needs to change. I will assume your R version will remain fixed.
I don't know what version of SPARQL you're on, but this is the latest:
install.packages("https://cran.r-project.org/src/contrib/Archive/SPARQL/SPARQL_1.16.1.tar.gz", repos=NULL, type="source")
Try it again after that. If it's still not working then try:
install.packages("devtools")
devtools::install_version("disgenet2r", version = "0.99.1")

Can't install library(Xgboost) for gpu in R (Windows 10)

I want to install the xgboost package for R with GPU support for Win10
I downloaded the tarball using this link https://github.com/dmlc/xgboost/releases/download/v1.6.0/xgboost_r_gpu_win64_1.6.0.tar.gz
I tried to manually install via the Rgui and I got this error
Warning in system("sh ./configure.win") : 'sh' not found
ERROR: configuration failed for package 'xgboost'
* removing 'C:/Users/adminos/Documents/R/win-library/4.0/xgboost'
Warning message:
In install.packages(files[tarballs], .libPaths()[1L], repos = NULL, :
installation of package ‘C:/Users/adminos/Downloads/xgboost_r_gpu_win64_1.6.0.tar.gz’ had non-zero exit status
So non-zero exit status lib wasn't installed.
How can I install Xgboost for GPU?
Please Help

Cannot install R packages on a Mac

I am trying to install packages (ANY!) in R on a Mac but it always gives me the same error:
Error in install.packages : type 'binary' is not supported on this platform
I have also tried using:
> install.packages("ggplot2_3.3.3.tar.gz", repos = NULL, type="source") Warning: invalid package ‘ggplot2_3.3.3.tar.gz’ Error: ERROR: no packages specified Warning in install.packages : installation of package ‘ggplot2_3.3.3.tar.gz’ had non-zero exit status
Did not have this problem before.
Can someone help me out please?
Thanks
Valentina

Package that previously worked now unpacks with "non zero exit status"

A package that I previously used, "mlogit", is now not unpacking in R. I have manually typed it in as well as using the install packages tool. Although it says "successfully installed", it is not unpacked and does not show up in the Rstudio list of packages. This is what I get in the console:
<U+2714> Package 'mlogit' successfully installed.
Warning messages:
1: In utils::install.packages("Rdpack", repos = "https://cran.rstudio.com/") :
installation of package 'Rdpack' had non-zero exit status
2: In utils::install.packages("mlogit", repos = "https://cran.rstudio.com/") :
installation of package 'Rdpack' had non-zero exit status
3: In utils::install.packages("mlogit", repos = "https://cran.rstudio.com/") :
installation of package 'mlogit' had non-zero exit status
I had not updated R or switched computers, and all my files associated with this script are in the exact same place. I've run it a million times. Not sure what's different now. All other packages I've tried work. There are not alternative packages I can use for this purpose.

Error in library("Hmisc"): there is no package called 'Hmisc'

I just installed R using anaconda, and I am following this tutorial:
https://www.analyticsvidhya.com/blog/2016/03/tutorial-powerful-packages-imputing-missing-values/
I learned that I need to install some package by using:
if(!require(Hmisc)) install.packages("Hmisc",repos = "http://cran.us.r-project.org")
There are some warning message i am not sure whether it means successful or not:
Loading required package: Hmisc
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'Hmisc'also installing the dependencies 'survival', 'ggplot2'
Warning message:
In install.packages("Hmisc", repos = "http://cran.us.r-project.org"): installation of package 'survival' had non-zero exit status
Warning message:
In install.packages("Hmisc", repos = "http://cran.us.r-project.org"): installation of package 'ggplot2' had non-zero exit status
Warning message:
In install.packages("Hmisc", repos = "http://cran.us.r-project.org"): installation of package 'Hmisc' had non-zero exit status
The downloaded source packages are in
'/tmp/Rtmpcf6rZ9/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Then I tried to load the library with
library(Hmisc)
But I got the error,
Error in library(Hmisc): there is no package called 'Hmisc'
Does anyone know what might has happened? Thanks.
Edit:
I am suggested to try a few more ways, but they all have various error:
install.packages("Hmisc")
Error in contrib.url(repos, type): trying to use CRAN without setting a mirror
If I do:
install.packages("Hmisc",repos = "http://cran.us.r-project.org")
I got:
also installing the dependencies 'survival', 'ggplot2'
Warning message:
In install.packages("Hmisc", repos = "http://cran.us.r-project.org"): installation of package 'survival' had non-zero exit status
Warning message:
In install.packages("Hmisc", repos = "http://cran.us.r-project.org"): installation of package 'ggplot2' had non-zero exit status
Warning message:
In install.packages("Hmisc", repos = "http://cran.us.r-project.org"): installation of package 'Hmisc' had non-zero exit status
The downloaded source packages are in
'/tmp/Rtmpcf6rZ9/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
I am suggested not to use Anaconda R, but because I mostly use rpy2 and jupiter notebook the most. I think using the Anaconda R may be the most straight forward method to get my jupiter notebook and python to work seamlessly with R.
I had a similar issue, solved it by installing "acepack" directly install.packages('acepack')
This is mysterious, regardless. I do an update of all packages in Conda. Then, I install Rstudio using anaconda. Then the error does not exist anymore...

Resources