Learn R Programming

The pepr package: Portable Encapsulated Projects in R

pepr is an R package for reading Portable Encapsulated Projects, or PEPs, in R. If you describe your project (configuration and samples) according to this format, you can load all project metadata into R using the pepr package. To test pepr, you can try loading one of the example PEPs.

Complete documentation and API for the pepr R package is at code.databio.org/pepr.

Quick start:

Install from CRAN:

install.packages("pepr")

Load a project and explore metadata like this:

library("pepr")
cfgPath = system.file(
    "extdata",
    "example_peps-master",
    "example_basic",
    "project_config.yaml",
    package = "pepr"
  )
p = Project(file = cfgPath)

sampleTable(p)
config(p)

Copy Link

Version

Install

install.packages('pepr')

Monthly Downloads

55

Version

0.6.0

License

BSD_2_clause + file LICENSE

Maintainer

Nathan Sheffield

Last Published

February 28th, 2026

Functions in pepr (0.6.0)

.getSubSampleTablePathFromConfig

Get the subsample tables from config
.listOfListToListOfDT

Dataframify list sublists
pullProject

Pull a PEP from PEPhub API
.loadSampleAnnotation

Read sample table from disk
sampleTable

View samples in the objects of "Project"
pepr

pepr
makeSectionsAbsolute

Make selected sections absolute using config path
.loadConfig

Load the config of a PEP
.listifyDF

Listify data frame columns
.printNestedList

Print a nested list
.reformat

Check config spec version and reformat if needed
fetchSamples

Collect samples fulfilling the specified requirements
.matchesAndRegexes

Create a list of matched files in the system and unmatched regular expessions
.isValidUrl

Determine whether the string is a valid URL
.mergeAttrs

Merge samples defined in sample table with ones in subsample table(s)
.isCfg

Config file or annotation file
getSample

Extract samples
.removeAttrs

Remove attributes across all the samples
saveJWT

Save or update JWT
.safeFileExists

Check whether the string is a valid URL or an existing local path
saveProject

Save a modified PEP Project to a local directory
.isAbsolute

Determine whether a path is absolute.
.modifySamples

Perform all the sample attribute modifications
select-config

Access "Config" object elements
getSubsample

Extract subsamples
listAmendments

List amendments
.modifySamplesFetched

Perform all the sample attribute modifications for fetched PEPs
.loadSubsampleAnnotation

Load single subsample annotation
fetchPEP

Fetch a PEP from PEPhub using a registry path (namespace/project:tag)
.makeAbsPath

Create an absolute path from a primary target and a parent candidate.
.strformat

Format a string like python's format method
.getSubscript

Get list subscript
config

Extract "Project"
.autoMergeDuplicatedNames

Merge samples with identical names
Config-class

Config objects and specialized list obejcts and expand string attributes
Project-class

Portable Encapsulated Project object
checkSection

Check for existence of a section in the Project config
activateAmendments

Activate amendments in objects of "Project"
Project

The constructor of a class representing a Portable Encapsulated Project
.appendAttrs

Append constant attributes across all the samples
.applyAmendments

Apply amendments
.applyImports

Function for recursive config data imports
.duplicateAttrs

Duplicate a selected attribute across all the samples
.getTableIndexes

Set table indexes
.expandList

Recursively try to expand list of strings
.implyAttrs

Imply attributes
.inferProjectName

Infer project name
.deriveAttrs

Derive attributes
.checkSection

Check for a section existence in a nested list
.getSampleTablePathFromConfig

Get the sample table from config
.expandPath

Expand system path