Commit 97621742 authored by Holger Brandl's avatar Holger Brandl

added method to ensure minimal package version

parent a6a486f2
......@@ -41,6 +41,12 @@ require.auto <- function(x){
}
}
check_version = function(pkg_name, min_version) {
cur_version = packageVersion(pkg_name)
if(cur_version < min_version) stop(sprintf("Package %s needs a newer version,
found %s, need at least %s", pkg_name, cur_version, min_version))
}
#check_version("dplyr", "0.4-1")
########################################################################################################################
## load core packages
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment