read_or_load: Read and save, or load simulation data

Description Usage Arguments

Description

read_or_load() is an "all-in-one" function that handles everything related to the reading, saving, and loading of data generated by the CODES adaptability simulation. Reading data (see read_logs()) takes a long time. This function integrates a saving and loading component that, after reading, saves a properly formatted .rds file which can be reloaded. On future uses of this function, the .rds file can be loaded instead of re-reading all of the simulation data.

Usage

1
read_or_load(rds, raw_dir)

Arguments

rds

(Optional) Character of path for a .RDS file. Will be used to load an existing file or, if none exists, to save a file after reading data. If left blank, interactive guidance will be provided.

raw_dir

(Optional) Character of path to the top-level directory of the raw data. Only required when data will be read for the first time. If left blank (and no .RDS file exists), interactive guidance will be provided.


drsimonj/adapter documentation built on May 15, 2019, 2:51 p.m.