Skip to content

Alon-Alexander/r_project_manager

Repository files navigation

pm

The R project manager you didn't know you need.


R-CMD-check codecov

pm enforces and supports a standardized folder structure for research projects. Researchers can focus on analysis while the package handles organization of code and results, reproducible input references, and discovery of outputs across analyses. Supports artifact discovery by ID, format-agnostic reading, and chaining outputs between analyses.

I recommend you to start your journey at the Getting Started Vignette.

Installation

This package is not on CRAN (yet), so please install it through github with the following:

library(devtools)
devtools::install_github("Alon-Alexander/r_project_manager")

Usage

See Getting Started Vignette for a proper introduction.

Here is the TL;DR of using the package (the basic functionalities):

# Create a new project (one-time)
pm <- pm_create_project(project_dir)

# Load an existing project
pm <- pm_project(project_dir)

# Look at available inputs
inputs <- pm$parse_inputs()

# Create a new analysis
prep_analysis <- pm$create_analysis("data_preprocessing")

# Create analysis from path (for example in the analysis's code)
analysis <- pm::PMAnalysis$new(path = ".")

# Get output path for storing artifact
cleaned_data_path <- prep_analysis$get_output_path("cleaned_data", type = "table")

# Read/write data (generic for many file types)
cleaned_data_path$write(my_table)
read_table <- cleaned_data_path$read()

# Find artifact of other analysis
cleaned_artifact <- another_analysis$get_artifact(
  "cleaned_data",
  analysis_name = "data_preprocessing"  # Can also pass NULL to search all analylses
)

# Get intermediate path for caching (local to an analysis)
normalized_path <- prep_analysis$get_intermediate_artifact("noramalized_data")

Releases

No releases published

Packages

No packages published

Languages