sma_read_files: Read files

View source: R/sma_read_files.R

sma_read_filesR Documentation

Read files

Description

Read output files

Usage

sma_read_files(fun, path = ".", folder = "analysis0000001", id = 1)

Arguments

fun

The function from which to read the ouput file. Options are sma_analyse_files, sma_derive_files and sma_evaluate_files.

path

A string. The object is read using this path.

folder

A string for the name of the folder within the path that contains the analysis.

id

An integer for the index of the object to extract.

Value

The object read from files.

Examples

params <- nlist(mu=0)
sims::sims_simulate("a ~ dnorm(mu, 1)", 
                    parameters = params, 
                    nsims = 5,
                    save = TRUE,
                    path=tempdir(),
                    exist = NA)
sma_analyse_files(code = "a ~ dnorm(mu, 1)
                          mu ~ dunif(-3,3)",
                  mode = sma_set_mode("quick"),
                  monitor = "mu",
                  path = tempdir())
sma_evaluate_files(parameters = params, 
                   path = tempdir())
sma_read_files(sma_evaluate_files, path = tempdir())

audrey-b/simanalyse documentation built on May 20, 2022, 7:45 p.m.