Skip to content
Prev 12037 / 12125 Next

[R-pkg-devel] Impact of Matrix requirement for R >= 4.4.0 on CRAN package ecosystem

Hi Maciej,

By default the install process uses the **latest** package available that
meets the requirements.
Installing Matrix with install.packages("Matrix") on R 4.3 or below won't
work.

The requirement for R >= 4.4.0 on Matrix was added on version 1.7-0 (thanks
to diffify: https://diffify.com/R/Matrix/1.6-5/1.7-0)
Currently on CRAN 6 packages require higher or equal versions of Matrix
1.7: CoTiMA, dependentsimr, FlexRL, gamm4, matrixCorr, organik
But 1475 packages don't require a specific version of Matrix, which by
default will use default to install from CRAN that requires R >= 4.4 if it
is not available.
And 198 packages require a version compatible with Matrix 1.7.0 and some
versions below it.

One can install packages if the other requirements are met:
- On systems with Matrix < 1.7.0, packages not requiring R >= 4.4 or Matrix
- On systems with R < 4.4, packages requiring Matrix >= 1.7.0 or R >= 4.4
(or any of their dependencies) cannot be installed
  One can't install the latest Matrix package but could install some of the
1663 packages that don't require Matrix 1.7.0 (if the other requirements
are met)

Packages do not **need** to update version requirements based on other
packages' version requirements if they want to support the latest versions.
They can do that if they want to limit the "support" for older versions.
By default users will get the latest Matrix version which requires a recent
R version.
If users of old R versions want to update they can as far as the package
requirements allow them.

Note that install.packages(<pkgname>) is not the only way to install
packages.
Older versions of packages can still be installed with
install.packages("path/pkg_ver.tar.gz") or install.packages("
https://cran.r-project.org/src/contrib/Archive/Matrix/Matrix_1.6-5.tar.gz",
repos = NULL) if their requirements are met.
But this doesn't "guarantee" that packages work together as CRAN (and
maintainers) might have not checked that combination of packages.

I hope this answered all the questions,

Llu?s

PS: The version of Matrix installed as recommended and from CRAN (
https://cran.r-project.org/package=Matrix) might be different as it happens
currently.

Missatge de Maciej Nasinski <nasinski.maciej at gmail.com> del dia dt., 20 de
gen. 2026 a les 11:58: