Skip to contents

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

Multi-Language Support

Use a named list to use multi-languages in Factors

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.

Design

The Design matrix is nOM rows and nFactor columns. The values in each column should either be numeric values indicating the levels for the corresponding factor, or the actual level values (i.e., Factors$Level) that correspond to each OM. See Examples.

Slots

Factors

A data.frame with column headings Factor, Level, and Description. See Details

Design

A data.frame with nFactor columns (i.e., length(unique(Factors$Factor))), and nOM rows. See Details

Preset

An optional named list for the preset buttons in the App(). The name of the list element will appear as a button in the App().

See also

OMs-methods(), Factors(), Design(), Preset()

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)