Skip to content
Snippets Groups Projects
Commit 97621742 authored by Holger Brandl's avatar Holger Brandl
Browse files

added method to ensure minimal package version

parent a6a486f2
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment