README.md

sourcer logo. sourceR: R packages and script sources will magically appear

sourceR

R package for sourcing, searching, and editing your project's .R scripts and other resources

Most enchanting features:

What the future may hold... (ie. stay tuned; in development) - Get source_packages() to handle install_github() and similar for repo links - Find/replace throughout all scripts in the /R directory or any subset - Temporarily summon() related scripts together into an .Rmd to easily edit or debug a workflow, then cast() the improved versions back to their original, separate script files or banish() the temporarily summoned document medly.

How to use this package:

  1. install_github("https://github.com/brendan-newlon/sourceR") Alternately, copy MyProjectTemplate.zip or manually copy the script files from sourceR's /R directory into the /R directory of your project's root folder.
  2. Copy the code below to the top of your project script (and update the variable this_file to your script's filename). Scripts within your project's /R directory will source/run automatically.
this_file = "sourceR.Rmd" ; source(file.path("R","sourceR.R")); sourceR(); source_ram(); source_wd(this_file); 
source_packages(c("dplyr", "readr", "stringr", "tidyr", "lubridate", "magrittr", "utf8"))
  1. Add or remove package names from the source_packages() vector above to suit the needs of your project.

Feeling lazy?

  1. Download MyProjectTemplate.zip. Copy the unzipped folder as a template for new projects with sourceR built in to load the scripts in your /R directory automatically.


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