Skip to content

zxskzxsk/rproject

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rproject

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

  • Source functions in the project. Using 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')
  • Generate file path in project. You can run R codes from any subfolders in a project. 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')

About

Project management in R

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%