This is a simple package for project management in R. The folder structure looks like * Root folder * project.ini * Project1 * config.ini * Rcode * Resources * Results * Project2 * config.ini * Rcode * Resources * Results
In the project.ini, all project will be listed
p1 = Project1
p2 = Project2
Each project has a prefix (short name), e.g. p1 for Project1 and p2 for Project2. All common functions for each project are stored in to Rcode subfolder named as prefix+Functions (e.g. p1Functions.R for Project1 and p2Functions.R for Project2).
To install:
the latest development version:
library(devtools)
install_github("byzheng/rproject")
How to use
project_fun
to source functions in a project. You can write R codes and functions in the files, but project_fun
will skip all R codes.# Only p1Functions.R
project_fun()
# All functions in the Rcode folder
project_fun(all = TRUE)
# Functions from another project if you are working in Project 1
project_fun(project = 'p2')
project_filepath
will generate the correct file path.# File in current project
project_filepath('Resources/tmp.csv')
# File in another project
project_filepath('Resources/tmp.csv', project = 'p2')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.