OMs
S4 class and functions
OMs-class.Rd
An object of class OMs
contains information about the operating models (MPs)
in the Slick()
object. Like all S4 objects in Slick
, slots in this
object can be accessed and assigned using functions corresponding to slot name.
See OMs()
and the the See Also
section below.
Details
Factors
Factors
can be accessed and assigned using Factors(myslick)
and
Factors(myslick) <- data.frame()
respectively.
The Factor
column should be character strings with the name of each factor,
while the Level
column is a numeric
or character
value with the level for the
corresponding factor.
The Description
column is a description for each row, i.e., a unique factor and level.
See Examples
.
Slots
Factors
A
data.frame
with column headingsFactor
,Level
, andDescription
. SeeDetails
Design
A
data.frame
withnFactor
columns (i.e.,length(unique(Factors$Factor))
), andnOM
rows. SeeDetails
Preset
An optional named list for the preset buttons in the
App()
. The name of the list element will appear as a button in theApp()
.
Examples
myOMs <- OMs()
Metadata(myOMs) <- data.frame()
#> Error: unable to find an inherited method for function ‘Metadata<-’ for signature ‘object = "OMs"’
# Design <- expand.grid(M=c(0.1, 0.2, 0.3), h=c(0.7,0.9))
#' Description <- list(c('Natural mortality (M) = 0.1',
#' 'Natural mortality (M) = 0.2',
#' 'Natural mortality (M) = 0.3'),
#' c('Steepness (h) = 0.7',
#' 'Steepness (h) = 0.9'))
#' Label <- list(c(M=0.1, M=0.2, M=0.3),
#' c(h=0.7, h=0.9))
#' myOMs <- OMs(Design, Description, Label)
#' mySlick <- Slick()
#' Design(mySlick) <- data.frame(M=c(0.1, 0.2, 0.3),
#' h=c(0.6, 0.7, 0.8)
#' )
#' Design(mySlick)