Package 'simpleSetup'

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

Help Index


Load a multiple packages, install most recent versions if missing

Description

Load a multiple packages, install most recent versions if missing

Usage

library_install(pkgs, repos = "http://cran.us.r-project.org", ...)

Arguments

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 install.packages.

Examples

library_install('utils')

## Not run: 
packages <- c('networkD3', 'coreSim')
library_install(packages)

## End(Not run)

Sets valid working directory from vector of possible directories

Description

Sets valid working directory from vector of possible directories

Usage

set_valid_wd(possible)

Arguments

possible

character vector of possible working directores

Details

Sets the working directory to the first valid directory from a list of possible directories.

Examples

## Not run: 
set_valid_wd(c('/examples/directory1', '/anotherExample/directory2'))

## End(Not run)