Methods for Creating, Accessing and Assigning OMs
objects
OMs-methods.Rd
The OMs
function is used both to create and modify an OMs-class()
object.
and to access and assign OMs
for an object of class Slick-class()
.
See Details
.
Usage
OMs(Factors = data.frame(), Design = data.frame(), Preset = list())
OMs(object) <- value
# S4 method for missing
OMs()
# S4 method for dataframe_list
OMs(Factors = data.frame(), Design = data.frame(), Preset = list())
Arguments
- 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()
.- object
A
Slick-class()
object- value
A
OMs-class()
object
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
.
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
.
Use Factors()
, Design()
, and Preset()
to access
and assign the values for an existing OMs
object, see Examples
.
Functions
OMs(missing)
: Create an emptyOMs
objectOMs(dataframe_list)
: Create a populatedOMs
object
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)