Learn R Programming

SimDesign (version 0.7)

aggregate_simulations: Collapse separate simulation files into a single result

Description

This function grabs all .rds files in the working directory and aggregates them into a single data.frame object.

Usage

aggregate_simulations(files = NULL)

Arguments

files
a character vector containing the names of the simulation files. If NULL, all files in the working directory ending in .rds will be used

Value

  • a data.frame with the (weighted) average of the simulation results

See Also

runSimulation

Examples

Run this code
setwd('my_working_directory')

final <- aggregate_simulations()
head(final)

saveRDS(final, 'my_final_simulation.rds')

Run the code above in your browser using DataLab