morinlab / GAMBLR

Set of standardized functions to operate with genomic data
https://morinlab.github.io/GAMBLR/
MIT License
3 stars 2 forks source link

nloptr error #180

Closed rdmorin closed 1 year ago

rdmorin commented 1 year ago

I get this error when trying to load GAMBLR (after merging my branch with Master). Does anyone know what might be causing this?

devtools::load_all()
ℹ Loading GAMBLR
Error in load_imports(path) : 
  The package `nloptr` (<= 1.2.2.3) is required.
rdmorin commented 1 year ago
> install.packages("nloptr")
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/nloptr_2.0.3.tgz'
Content type 'application/x-gzip' length 1949220 bytes (1.9 MB)
==================================================
downloaded 1.9 MB

The downloaded binary packages are in
    /var/folders/kk/mjt9hn3n7nn25nfvhv6mkjm40000gn/T//RtmpdrVmXC/downloaded_packages
> devtools::load_all()
ℹ Loading GAMBLR
Setting options('download.file.method.GEOquery'='auto')
Setting options('GEOquery.inmemory.gpl'=FALSE)
Error in load_imports(path) : 
  The package `nloptr` (<= 1.2.2.3) is required.
mattssca commented 1 year ago

If I remember correctly, there was a lot of back and forth with this package a couple of weeks ago, when the dependency issues were addressed. I think @Kdreval can provide more insight as to why this might fail for you, a possible solution, for now, could maybe be to try:

devtools::install_version("nloptr", version = "1.2.2.3", repos = "http://cran.us.r-project.org/")
Kdreval commented 1 year ago

Yes, Adam is right - this is a pesky dependency that is not up to speed with R. Basically it does not support R version > 4 and this is the reason we need to restrict this down to the last workable 1.2.2.3. The command Adam posted is working and is our go-to solution for an existing installation

rdmorin commented 1 year ago

If I remove the dependency restriction in DESCRIPTION then the installation works fine (using my more up to date version of nloptr).

Kdreval commented 1 year ago

I can investigate this to find out whether the nloptr been updated and now supports the R4 versions

Kdreval commented 1 year ago

This is now fixed allowing for the use of the latest version. Thanks for reporting!