Learn R Programming

DLMtool (version 5.0)

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. Since DLMtool 4.5 this function is no longer recommended. Use 'OMinit' instead.

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. Only required if more than one Stock in the Excel file.

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', Observation parameters in a tab named 'myFishObs', and Implementation in 'myFishImp'. All tabs (Stock, Fleet, Obs, and Imp) 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 {
# }
# NOT RUN {
OM <- OM_xl(fname='OMTables.xlsx', stkname='myFish')
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab