Loading Legacy Libraries and Packages

My office supports several local R packages that are central to our workflow. These are all legacy packages, originally developed 5 to 6 years ago. Each time R and R-Studio are updated, we lose the ability to load and use these packages. We receive messages like this:

> install.packages('J:/Estimates/Admin/OLDAppDevelopment/codemogAPI')
Installing package into ‘C:/Users/abickford/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘J:/Estimates/Admin/OLDAppDevelopment/codemogAPI’ 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

Is there a workaround for this problem?

And, why is R not backward compatible? The code in these libraries has not changed, why do I lose the functionality when I update R and R-Studio?

TIA

This seems like a folder path not the path to a source or binary file, also for installing packages from binaries the command would be:

install.packages(path_to_file, repos = NULL)

And from source

install.packages(path_to_file, repos = NULL, type="source")

RStudio is just an IDE so it has nothing to do with your R package library but updating R to a new major version does require you to reinstall your packages since they require to be compiled for a specific R version, also, on Windows each R version gets its own package library so you need to account for that and move your packages or point your package library to the old folder.

We would need more specific information to help you out with this.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.