R package for sourcing, searching, and editing your project's .R scripts and other resources
Most enchanting features:
sourceR()
or, if you're a ghoul, sourceR("path/to/wherever/ghouls/keep/their/r/scripts", exclude=c("spooky_noise.R", "big_red_button.R", "south_tower.R"))
source_packages(c("dplyr", "stringr", "readr"))
source_ram()
or specify configurations like source_ram(only_free=TRUE)
or source_ram(percent_of_total=20)
source_wd("myScript.Rmd")
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.
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.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"))
source_packages()
vector above to suit the needs of your project.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.