is_installed <- function (pkg, version = 0) {
installed_version <- tryCatch(utils::packageVersion(pkg),
error = function(e) NA)
!is.na(installed_version) && installed_version >= version
}
Doesn't work in R>=4.4 . The comparison installed_version >= version fails because installed_version is a packageVersion object and can't be compared to a numeric anymore. The fix is to change it to:
This snippet here from
helpers-install.R
:Doesn't work in R>=4.4 . The comparison
installed_version >= version
fails becauseinstalled_version
is apackageVersion
object and can't be compared to a numeric anymore. The fix is to change it to:installed_version >= as.character(version)