Creating an OM

Operating Model objects can be created in several ways.

Import from Excel

The XL2OM function imports an operating model from a correctly formatted Excel workbook.

See here for details on creating and populating the OM Excel workbook.

Example use of the XL2OM function:

OM <- XL2OM(name='OM.xlsx')

Create in R

OM objects can be created in a R session with new.

For example:

# An empty OM object
OM <- new('OM')

# An OM populated with Stock, Fleet, Obs, and Imp objects
OM <- new('OM', Albacore, Generic_DecE, Precise_Biased, Overages)

See the sections on the Stock, Fleet, Obs, and Imp objects for details on these objects.

Import a Stock Assessment

openMSE includes functions for importing operating models from the output of several commonly used stock assessment packages.

See here for more details.

Existing Operating Models

Many existing operating models are available in the Operating Model Library. The OM Excel files can be downloaded and imported using XL2OM described above.

Additionally, the OMs in the Operating Model Library are available in the MSEextra package:

# downloads MSEextra package from GitHub
MSEextra()
# load the MSEextra package
library(MSEextra)

The avail function can be used to determine the OM objects that are available in the R session:

# includes the MSEextra OMs
avail('OM')
## Searching for objects of class OM in package: MSEtool
## Searching for objects of class OM in package: SAMtool
## Searching for objects of class OM in package: DLMtool
## Searching for objects of class OM in package: MSEextra
##  [1] "OM"                            "testOM"                       
##  [3] "Almaco_Jack_GOM_NOAA"          "Banded_Morwong_Tasmania"      
##  [5] "Barred_Sand_Bass_CA_CDFW"      "California_Halibut_CA_CDFW"   
##  [7] "Canary_Rockfish_BC_DFO"        "Gatuzo_Argentina_INIDEP"      
##  [9] "Haddock_Faroe_Islands"         "Hogfish_PR_NOAA"              
## [11] "Jonah_Crab_LFA34_DFO"          "Lane_Snapper_GOM_NOAA"        
## [13] "Lesser_Amberjack_GOM_NOAA"     "Pacific_Hake_USCan"           
## [15] "Queen_Triggerfish_STT_NOAA"    "Red_Drum_GOM_NOAA"            
## [17] "Red_Sea_Urchin_CA_CDFW"        "Shortspine_Thornyhead_BC_DFO" 
## [19] "Skipjack_IO_IOTC"              "Snowy_Grouper_GOM_NOAA"       
## [21] "Speckled_Hind_GOM_NOAA"        "Spiny_Lobster_STX_NOAA"       
## [23] "Stones_Sheep_BC"               "Stoplight_Parrotfish_STX_NOAA"
## [25] "Warty_Sea_Cucumber_CA_CDFW"    "Yelloweye_Rockfish_BC_DFO"    
## [27] "Yellowmouth_Grouper_GOM_NOAA"  "Yellowtail_Snapper_PR_NOAA"