How do I install an archived CRAN package - r

I am trying to use the allanvar package which is documented on this rdocumentation page and this rdrr.io cran page. When I attempt to load it I get the following
> install.packages("allanvar")
Error: package 'allanvar' is not available
Am I doing something wrong, or has it been yanked?

To see if a package has been archived, you can go to its CRAN page. In this case, it is https://cran.r-project.org/web/packages/allanvar , but it's the same url pattern for other packages. Just put the package name after the last forward slash.
You will see on this page that it has been archived since 2020. To get the last stable CRAN version (which passed all CRAN checks with R version 4.0.2), you can do:
devtools::install_version('allanvar', version = '1.1')

This package is archived. This could be due to some minuscule thing that would be resolved soon, see this.
In the meantime, I'd install this using the GitHub repo:
remotes::install_github("jhidalgocarrio/allanvar")

Related

installing the package fwildclusterboot

I have troubles with installing the package fwildclusterboot. It says that it is no longer available in CRAN. Also didn't succeed even when I exploited it from the archive. I was searching for some new version but could not find it.
Can you please help me how to do it?
I am the author of fwildclusterboot.
Due to issues with a broken dependency I did not manage to fix on time, fwildclusterboot is temporarily not available on CRAN. The long story is that a dependencies' dependency failed a test, then the dependency was not fixed, therefore archived on CRAN, and I did not manage to a) drop the dependency on time and pass all CRAN notes within the given two-three week time limit. Now I am trying to bring the package back, but CRAN is not very responsive towards me.
In the meantime, you can download the package from R universe (a CRAN alternative, set up by rOpensci) by running install.packages('fwildclusterboot', repos ='https://s3alfisc.r-universe.dev'). I hope the package will be back on CRAN soon!

R package, fOptions is no longer available

I need to install R package fOpitons for a learning module required by society of actuaries. This package seems to be no longer available on CRAN. It was taken down in April 2022 for misrepresentation of authorship and ownership of copyright. None of the links to former versions of the package works. How can I install this package?
https://cran.r-project.org/web/packages/fOptions/index.html
None of the links in this site works.
https://cran-archive.r-project.org/web/checks/2022/2022-04-29_check_results_fOptions.html
(Note for eager "close as duplicate": the Archive/ link for this package is (currently?) broken which is very unusual for CRAN so I spelled out alternative approaches below. That part is likely not a duplicate. Cheers. -D.)
CRAN packages are open source, and even when removed from the current CRAN index for reasons deemed necessary by the CRAN team will always remain available in the Archive/ section of the package.
So the link you provide has as its second line
Formerly available versions can be obtained from the archive.
where the archive link should provide you access to various versions.
However, it is not working, which looks like an error. So I just alerted CRAN to that.
I happen to have maintained fOptions in Debian for a number of years. So you still get the Debian binary packages -- and sources. Most recent versions are at https://packages.debian.org/sid/r-cran-foptions point for example to the source archive: http://deb.debian.org/debian/pool/main/f/foptions/foptions_3042.86.orig.tar.gz
If you can install from source this should do.
Otherwise, there is also a CRAN mirror at GitHub so
https://github.com/cran/fOptions is another choice.

Installing a Package Removed from CRAN

I am using the R programming language. I am trying to install the "Data Mining with R" (DMwR) package. However, when I visit the CRAN website for this package, it seems to be gone:
Package ‘DMwR’ was removed from the CRAN repository.
Formerly available versions can be obtained from the archive.
Archived on 2021-03-16 as check problems were not corrected despite reminders.
A summary of the most recent check results can be obtained from the check results archive.
I visited the Github page for this package
Then, I tried to install this package directly from Github:
> library(devtools)
Loading required package: usethis
Warning message:
package ‘usethis’ was built under R version 4.0.5
> install_github("Luis Torgo/DMwR")
Error: Failed to install 'unknown package' from GitHub:
JSON: EXPECTED value GOT <
But this also is not working. Can someone please show me how to install this package?
Besides installing from the CRAN mirror repo, another option is
remotes::install_version("DMwR", version="0.4.1")
for this method, you do have to look up the last version in the archive directory (would probably be scrapeable if you wanted to write the code)
as with remotes::install_github("cran/<package>"), you will be installing from source, which means that if the package or any of its dependencies have compiled components (in this case it doesn't appear so), you'll need to have development tools (compiler etc.) installed on your system
A quick word of caution:
this will work well if packages have been archived recently, and if the reason for archiving was because the CRAN maintainers are being fussy (that's their prerogative);
however, a package may have become incompatible with the rest of the current R ecosystem (R version, dependencies) since its last update - in which case you may find yourself in dependency hell trying to install it (or, worse, your results may be unreliable).
Had the same message on R 4.1.0
install.packages("DMwR")
Warning message:
package ‘DMwR’ is not available for this version of R
An option is also to create a checkpoint. According to the CRAN package website, it is archived on '2021-03-16'. So, we could use the checkpoint one day before that date
library(checkpoint)
checkpoint("2021-03-15")
install.packages("DMwR")
library(DMwR)
#Loading required package: lattice
#Loading required package: grid
#Registered S3 method overwritten by 'quantmod':
# method from
# as.zoo.data.frame zoo
The checkpoint can be deleted as well
delete_all_checkpoints()
You can install it from the CRAN github mirror (despite it being removed from CRAN), e.g.
library(devtools)
install_github("cran/DMwR")
That package was in support of a book published in 2010. The author published a second edition in 2017 and the current version of the support package is https://cran.r-project.org/web/packages/DMwR2/index.html
It does have currently CRAN-hosted source and binary packages, and doesn't need compilation, so it should be able to be installed with:
install.packages("DMwR2", dependencies=TRUE)
You can get the most recent version by following the directions at the Github site:
library(devtools) # You need to install this package!
install_github("ltorgo/DMwR2",ref="develop")
Those are much more likely to run properly with recent versions of R.

R submitting archived package to CRAN

One of my R package DiallelAnalysisR was removed from the CRAN repository. Now I fixed the problem and want to resubmit it to CRAN. However, after submitted the package I got the following NOTE
CRAN teams' auto-check service
Flavor: r-devel-windows-ix86+x86_64
Check: CRAN incoming feasibility, Result: NOTE
Maintainer: 'Muhammad Yaseen <myaseen208#gmail.com>'
Any hints to fix this NOTE. Thanks
You actually don't need to do anything. Just mention in cran_comments.md why the package got archived and that you have fixed the cause of that, and that's it.
You can ignore this NOTE.

CRAN Package check page shows error for previously submitted package

I was about to send updated package to CRAN. Then I am asked to agree that I fixed following issues found in previous package (which was added to CRAN anyway).
But how to fix this? How to make package installable on r-oldrel-osx-x86_64
Google doesn't give any hints :-(

Resources