Learn R Programming

DLMtool (version 5.2)

XL2OM: Load OM from Excel file

Description

Imports an OM from a correctly formatted Excel file. Create the Excel spreadsheet template using OMinit and document each slot in the corresponding text file.

Usage

XL2OM(name = NULL, cpars = NULL, msg = TRUE)

Arguments

name

Name of the OM Excel file in the current working directory.

cpars

An optional list of custom parameters (single parameters are a vector nsim long, time series are a matrix nsim rows by nyears columns)

msg

Should messages be printed?

Value

An object of class OM

Details

An error message will alert if any slots are missing values, or if the Excel file is missing the required tabs.

Examples

Run this code
# NOT RUN {
OMinit('myOM', templates=list(Stock='Herring', Fleet='Generic_Fleet', Obs='Generic_Obs',
Imp='Perfect_Imp'), overwrite=TRUE)
myOM <- XL2OM('myOM.xlsx')

# }

Run the code above in your browser using DataLab