source_file: Source a file for the main.R file execution.

Description Usage Arguments Value Author(s) Examples

View source: R/package_functions.R

Description

A wrapper function for the base source command but also perfoms some backend functions to track the progress of the files executed in "main.R" as well as updating the project progress bar. This function should only be used in the "main.R" script.

Usage

1
2
source_file(file, inFolder = NULL, docname = NULL,
  dont_unload = NULL, ...)

Arguments

file

A character string giving the name of the file to get the full folder path for (i.e. "main.R").

inFolder

An identifer to narrow the search in case there are multiple files with same name but in different folders (i.e. "Codes/Model1").

dont_unload

A character list of packages names to prevent from being unloaded

...

Additional parameters to pass to source

Value

No return value

Author(s)

Alex Hubbard (hubbard.alex@gmail.com)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
link_to_proj()
set_proj_models(
  Model1 = T,
  Model2 = T
)
if(execute_proj_model("Model1")){
  source_file("Model1.R", inFolder = "Codes")
}
if(execute_proj_model("Model2")){
  source_file("Model2.R", inFolder = "Codes")
}

opendoor-labs/projectmap documentation built on Oct. 8, 2019, 1:58 p.m.