Read in operating model parameters from Excel spreadsheet

Share:

Description

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

Usage

1
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?

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.

Value

A object of class OM

Author(s)

A. Hordyk

Examples

1
2
3
4
## Not run: 
OM <- OM_xl(fname="OMTables.xlsx", stkname="myFish")

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.