install package: package ‘gmwm’ is not available for this version of R
2
0
Entering edit mode
13 days ago
snajafy • 0

I have some problems when I want to install some package for R. For example imudata package. I see following error:

 install.packages("gmwm")
Installing package into ‘C:/Users/najafi/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘gmwm’ 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

How can I solve this problem?

Thanks a lot.

r • 497 views
ADD COMMENT
2
Entering edit mode
13 days ago
Mathew ▴ 140

Hi,

This is what happens when I run some code to diagnose the issue. First, I wanted to see what version of R was required for the package. All packages uploaded to CRAN (which is where your packages are pulled from when you do install.packages()) are required to include this information, so you can do packageDescription("gmwm") to find out. But this is what I get:

> packageDescription("gmwm")
[1] NA
Warning message:
In packageDescription("gmwm") : no package 'gmwm' was found

I searched for the package through the "Available CRAN Packages By Name" (https://cran.r-project.org/web/packages/available_packages_by_name.html) and it was not listed. I went to their GitHub and followed their link to their CRAN page, and got the following message:

Package ‘gmwm’ was removed from the CRAN repository.

Formerly available versions can be obtained from the archive.

Archived on 2017-04-16 as installation errors were not corrected despite reminders.

Please use the canonical form https://CRAN.R-project.org/package=gmwm to link to this page.

You can view this message here: https://cran.rstudio.com/web/packages/gmwm/. This suggests you probably can't install that specific package using install.packages() anymore.

However, you can still access gmwm from the CRAN archive when it was available: https://cran.r-project.org/src/contrib/Archive/gmwm/.

I am not sure about the other packages you mentioned that you are having issues with, but you can use the steps I take as a general guideline to help diagnose what version of R is required for a package, and some steps you can take if packageDescription() doesn't work.

ADD COMMENT
0
Entering edit mode

Hi, Thanks for your answer, I do it, but I get this error:

ERROR: compilation failed for package 'gmwm'

removing 'C:/Users/najafi/AppData/Local/R/win-library/4.2/gmwm' Warning in install.packages : installation of package ‘C:/Users/najafi/Downloads/gmwm_2.0.0.tar.gz’ had non-zero exit status
ADD REPLY
0
Entering edit mode

Find someone with computer skills near you and consult them. From your posts on the forum, it's clear that you need help at a level that we cannot give you - you need someone physically next to you.

ADD REPLY
1
Entering edit mode
13 days ago
Pine ▴ 20

To follow on Mathew's reply, one way might be to try and see if you can download and install the package tarball locally:

  1. Get the package tarball from CRAN Archive [I guess this is the link but double check]! https://cran.r-project.org/src/contrib/Archive/gmwm/

  2. Attempt installing the package using below command:

    install.packages("./[Path/to/tarball].tar.gz", repos = NULL)

    library("Package")

If there is a compatibility issue, you could try installing an older and compatible version of R to install the package locally using above. For instance "rswitch" for macOS allows toggling between multiple R versions.

If not, you might be able to find the specific functions you want from developer's github page [I guess below is the link but double check]: https://github.com/SMAC-Group/gmwm/tree/master/R

ADD COMMENT
0
Entering edit mode

Hi, Thanks for your answer, I do it, but I get this error: ERROR: compilation failed for package 'gmwm'

  • removing 'C:/Users/najafi/AppData/Local/R/win-library/4.2/gmwm' Warning in install.packages : installation of package ‘C:/Users/najafi/Downloads/gmwm_2.0.0.tar.gz’ had non-zero exit status
ADD REPLY
0
Entering edit mode

This seems to indicate that the package itself (or packages it depends on) are not compatible with the R version you are using. Next step could be to install a compatible earlier version of R. I have no experience with windows systems but below might be useful:

https://bioinformatics.ccr.cancer.gov/docs/rtools/R%20and%20RStudio/2.6_switching_r_version/

Based on the age of the package, I guess R v3.6 (~2019) would be a good place to start. Then you will need to manually install the package (as above) alongside the packages it might depend on. However, installing/compiling all the related packages might become a mini-project of its own.

Another alternative is to check the package codes on github directly and extract the ones you need. Based on your programming skills and the complexity of the package codes, this might or might not prove more straight forward.

Good luck!

ADD REPLY

Login before adding your answer.

Traffic: 1281 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6