Skip to contents

An OMs object contains information about the operating models (MPs) in the Slick() object.

Usage

OMs()

Arguments

Metadata

A data.frame with a specific structure, describing the details of the operating models. See Details section

Design

A data.frame with the design matrix for the OMs. The columns must be named with the factor names. The rows contain the factor levels for each OM. See Details section

Preset

An optional named list of preset buttons for filters in the App(). See Details section.

Value

An object of class OMs

Details

OMs() creates an empty OMs object.

Each slot of the OMs object can be accessed or modified by the corresponding accessor function. See Examples sections below for more details.

Metadata

The Metadata data.frame must have n OMs rows and the following columns:

  • Code: A short character string for identifying the MPs. Used in the App() in places where there is no room for a full label.

  • Label: A long character string (one word or max two words) for identifying the MPs.

  • Description: A longer character string providing a description of the MPs.

  • Color: A character vector with the colors to use to display the MPs in the App(). Optional. If not provided, the App will try to set some sensible colors.

Design

Preset

Examples


myOMs <- OMs()

Metadata(myOMs) <- data.frame()


# 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)