Skip to contents

This function runs a Stock Production Model (SPM) analysis in the specified directory. The function changes the working directory to `dirname`, runs the SPM analysis, and then reads the results from `spm_detail.csv`. It returns to the original working directory after completing the analysis.

Usage

runSPM(dirname, ctrl = NULL, run = FALSE)

Arguments

dirname

A string specifying the directory in which to run the SPM analysis.

ctrl

Optional control settings for the SPM analysis. If NULL, default settings are used.

Value

A data frame containing the results from `spm_detail.csv`.

Examples

runSPM("examples/atka")
#> Error: 'examples/atka/spm_detail.csv' does not exist in current working directory ('/Users/jim/_mymods/afsc-assessments/spmR/docs/reference').