Learn R Programming

DLMtool (version 3.2)

OM_xl: Read in operating model parameters from Excel spreadsheet

Description

A function to read in operating model parameters from an Excel spreadsheet with tabs named following specific convention.

Usage

OM_xl(fname, stkname, fpath = "", saveCSV = FALSE)

Arguments

fname
Name of the Excel spreadsheet file. Must include file extension.
stkname
Name of the Stock.
fpath
Full file path, if file is not in current working directory
saveCSV
Do you also want to save the Stock, Fleet and Observation parameters to CSV files?

Value

A object of class OM

Details

The Excel spreadsheet must have tabs named with the following convention. For example if stkname is "myFish", the Stock parameters are in a tab named "myFishStock"", Fleet parameters in a tab named "myFishFleet", and Observation parameters in a tab named "myFishObs". All three tabs (Stock, Fleet and Obs) must be present for a single stock. You can have multiple stocks in a single spreadsheet, provided that the stock names are different.

Examples

Run this code
## Not run: 
# OM <- OM_xl(fname="OMTables.xlsx", stkname="myFish")
# ## End(Not run)

Run the code above in your browser using DataLab