Title: | Helper Package to Install Packages for R |
---|---|
Description: | Helper function to install packages for R using an external 'requirements.txt' or a string containing diverse packages from several resources like Github or CRAN. |
Authors: | Jonathan M. Mang [aut, cre] , MIRACUM - Medical Informatics in Research and Care in University Medicine [fnd], Universitätsklinikum Erlangen [cph] |
Maintainer: | Jonathan M. Mang <[email protected]> |
License: | GPL-3 |
Version: | 0.0.3 |
Built: | 2024-11-15 03:05:45 UTC |
Source: | https://github.com/joundso/requirements |
Install the packages provided to this function
install( packages = NULL, path_to_requirements = NULL, quiet = TRUE, upgrade = "always" )
install( packages = NULL, path_to_requirements = NULL, quiet = TRUE, upgrade = "always" )
packages |
(Optional, String, also as vector) The actual packages to install. |
path_to_requirements |
(Optional, String) The path (including filename and type ending) to a text file containing all the packages to install. |
quiet |
If |
upgrade |
Should package dependencies be upgraded? One of "default", "ask", "always", or "never". "default"
respects the value of the |
(Boolean) 'TRUE' if all packages are successfully installed, 'FALSE' otherwise.
## Not run: ## Test it with a string: demo_string <- " DIZutils data.table joundso/mainzelliste-connector miracum/misc-dizutils@development # this_one_will_be_ignored " requiRements::install(packages = demo_string) ## Test it with a vector: demo_vec <- c( "", "DIZutils", "data.table", "joundso/mainzelliste-connector", "miracum/misc-dizutils@development", "# this_one_will_be_ignored" ) requiRements::install(packages = demo_vec) ## Test it with a file: demo_path <- "./data-raw/requirements.txt" requiRements::install(path_to_requirements = demo_path) ## Test it with a string AND a file: requiRements::install(packages = demo_string, path_to_requirements = demo_path) ## Test it with a vector AND a file: requiRements::install(packages = demo_vec, path_to_requirements = demo_path) ## End(Not run)
## Not run: ## Test it with a string: demo_string <- " DIZutils data.table joundso/mainzelliste-connector miracum/misc-dizutils@development # this_one_will_be_ignored " requiRements::install(packages = demo_string) ## Test it with a vector: demo_vec <- c( "", "DIZutils", "data.table", "joundso/mainzelliste-connector", "miracum/misc-dizutils@development", "# this_one_will_be_ignored" ) requiRements::install(packages = demo_vec) ## Test it with a file: demo_path <- "./data-raw/requirements.txt" requiRements::install(path_to_requirements = demo_path) ## Test it with a string AND a file: requiRements::install(packages = demo_string, path_to_requirements = demo_path) ## Test it with a vector AND a file: requiRements::install(packages = demo_vec, path_to_requirements = demo_path) ## End(Not run)