MPs
S4 class and functions
MPs-class.Rd
An object of class MPs
contains information about the management procedures (MPs)
in a Slick-class()
object. Like all S4 objects in Slick
, slots in this
object can be accessed and assigned using functions corresponding to slot name.
See MPs()
and the the See Also
section below.
Details
Objects of class MPs
are created with MPs()
Slots
Code
A short code for the Management Procedures in this
Slick
object. A character string lengthnMP
or a named list for multi-language support. SeeDetails
RequiredLabel
A short label for the Management Procedures in this
Slick
object. Can be longer thanCode
but recommended to keep short as possible so it shows clearly in plots and tables. A character string lengthnMP
or a named list for multi-language support. SeeDetails
RequiredDescription
A description for the Management Procedures in this
Slick
object. Can include Markdown, seeExamples
. A character string lengthnMP
or a named list for multi-language support. SeeDetails
Color
A character vector of colors for the MPs. Defaults will be used if not populated
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
myMPs <- MPs()
Code(myMPs) <- c('MP1', 'MP2', 'MP3')
Label(myMPs) <- c('Management Procedure 1',
'Management Procedure 2',
'Management Procedure 3')
Description(myMPs) <- c('This is the description for Management Procedure 1',
'This is the description for Management Procedure 2',
'This is the description for Management Procedure 3')
Preset(myMPs) <- list(All=1:3, FirstTwo=1:2)
myMPs
#>
#> ── An object of class `MPs` ────────────────────────────────────────────────────
#>
#> ── `Code` ──
#>
#> 1 MP1
#> 2 MP2
#> 3 MP3
#>
#> ── `Label` ──
#>
#> 1 Management Procedure 1
#> 2 Management Procedure 2
#> 3 Management Procedure 3
#>
#> ── `Description` ──
#>
#> 1 This is the description for Management P ...
#> 2 This is the description for Management P ...
#> 3 This is the description for Management P ...
#>
#> ── `Color` ──
#>
#> 1 #C87A8A
#> 2 #6B9D59
#> 3 #5F96C2
#>
#> ── `Preset` ──
#>
#> ── All
#> 1
#> 2
#> 3
#>
#> ── FirstTwo
#> 1
#> 2
# Multi-language
Description(myMPs) <- list(en=c('This is the English description for Management Procedure 1',
'This is the English description for Management Procedure 2',
'This is the English description for Management Procedure 3'),
es=c("This is the Spanish description for Management Procedure 1",
"This is the Spanish description for Management Procedure 2",
"This is the Spanish description for Management Procedure 3"),
fr=c("This is the French description for Management Procedure 1",
"This is the French description for Management Procedure 2",
"This is the French description for Management Procedure 3")
)
Metadata(myMPs)
#> Code Label
#> 1 MP1 Management Procedure 1
#> 2 MP2 Management Procedure 2
#> 3 MP3 Management Procedure 3
#> Description Color
#> 1 This is the English description for Management Procedure 1 #C87A8A
#> 2 This is the English description for Management Procedure 2 #6B9D59
#> 3 This is the English description for Management Procedure 3 #5F96C2
Metadata(myMPs, 'es')
#> Code Label
#> 1 MP1 Management Procedure 1
#> 2 MP2 Management Procedure 2
#> 3 MP3 Management Procedure 3
#> Description Color
#> 1 This is the Spanish description for Management Procedure 1 #C87A8A
#> 2 This is the Spanish description for Management Procedure 2 #6B9D59
#> 3 This is the Spanish description for Management Procedure 3 #5F96C2
Metadata(myMPs, 'fr')
#> Code Label
#> 1 MP1 Management Procedure 1
#> 2 MP2 Management Procedure 2
#> 3 MP3 Management Procedure 3
#> Description Color
#> 1 This is the French description for Management Procedure 1 #C87A8A
#> 2 This is the French description for Management Procedure 2 #6B9D59
#> 3 This is the French description for Management Procedure 3 #5F96C2