Title: | Set Up R Source Code Files for Use on Multiple Machines |
---|---|
Description: | When working across multiple machines and, similarly for reproducible research, it can be time consuming to ensure that you have all of the needed packages installed and loaded and that the correct working directory is set. 'simpleSetup' provides simple functions for making these tasks more straightforward. |
Authors: | Christopher Gandrud [aut, cre] |
Maintainer: | Christopher Gandrud <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.1.1 |
Built: | 2024-11-17 06:25:24 UTC |
Source: | https://github.com/christophergandrud/simplesetup |
Load a multiple packages, install most recent versions if missing
library_install(pkgs, repos = "http://cran.us.r-project.org", ...)
library_install(pkgs, repos = "http://cran.us.r-project.org", ...)
pkgs |
character vector of packages names. |
repos |
character vector, the base URL(s) of the repositories to use, e.g., the URL of a CRAN mirror such as "https://cloud.r-project.org". |
... |
arguments passed to |
library_install('utils') ## Not run: packages <- c('networkD3', 'coreSim') library_install(packages) ## End(Not run)
library_install('utils') ## Not run: packages <- c('networkD3', 'coreSim') library_install(packages) ## End(Not run)
Sets valid working directory from vector of possible directories
set_valid_wd(possible)
set_valid_wd(possible)
possible |
character vector of possible working directores |
Sets the working directory to the first valid directory from a list of possible directories.
## Not run: set_valid_wd(c('/examples/directory1', '/anotherExample/directory2')) ## End(Not run)
## Not run: set_valid_wd(c('/examples/directory1', '/anotherExample/directory2')) ## End(Not run)