sourceR: Automagically source scripts

Description Usage Arguments Value

View source: R/sourceR.R

Description

sourceR helps to manage project code by sourcing scripts selectively, recursively. By default it will load any .R file in the project's /R directory or subdirectories.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
sourceR(
  source_dir = "R",
  include_rmd = F,
  exclude_dirs = "",
  exclude_files = "",
  recursive = T,
  exclude_marked_exclude = T,
  exclude_sourceR = T,
  echo_files_sourced = T
)

Arguments

source_dir

The relative name of the directory within your project folder containing scripts to source.

include_rmd

TRUE to also source .Rmd files.

exclude_dirs

A character string or vector of directories to exclude from automatic sourcing.

exclude_files

A character string or vector of files that should not be sourced.

recursive

TRUE to source files in the source_dir and any directories within it, and so on.

exclude_marked_exclude

TRUE to avoid sourcing any script with a filename with an "_exclude" suffex, eg. "IncompleteScript_exclude.R"

exclude_sourceR

TRUE to skip reloading this function from source whenever the function is called.

echo_files_sourced

TRUE to echo the list of files sourced to output/console.

Value

Uses the source function to load and/or run scripts in the projects /R directory.


brendan-newlon/sourceR documentation built on Jan. 28, 2022, 10:14 a.m.