combine_bgc_output: Aggregate BGC Output

View source: R/combine_bgc_output.R

combine_bgc_outputR Documentation

Aggregate BGC Output

Description

This function aggregates multiple BGC runs into one file. Runs are joined by columns and must all contain the same number of post-burnin MCMC iterations. It assumes that input files are contained in a single directory and have specific file suffixes. See the README.md file for details on file suffixes. Files can have population prefixes.

Usage

combine_bgc_output(results.dir, prefix, thin = NULL, discard = NULL)

Arguments

results.dir

Path to a directory containing all the BGC results

prefix

Prefix to the input files; e.g., "population1"

thin

Thin to every n MCMC samples. E.g. thin=2 cuts samples in half

discard

Discard first N samples from each BGC run

Value

A list of data.frames (each data.frame is a BGC parameter)

Examples

aggregate.results <- combine_bgc_output(results.dir = "./results",
                                        prefix = "population1")

aggregate.results <- combine_bgc_output(results.dir = "./results",
                                        prefix = "population2",
                                        thin = 2)

aggregate.results <- combine_bgc_output(results.dir = "./results",
                                        prefix = "pop3",
                                        discard = 2000)

btmartin721/ClineHelpR documentation built on Oct. 15, 2024, 5:05 a.m.