Skip to contents

The Kobe function is used both to create and modify an Kobe-class() object. and to access and assign Kobe for an object of class Slick-class(). See Details.

Usage

Kobe(
  Code = "",
  Label = "",
  Description = "",
  Time = numeric(),
  TimeLab = "Year",
  Value = array(),
  Preset = list(),
  Target = 1,
  Limit = 1
)

Kobe(Slick) <- value

# S4 method for missing
Kobe()

# S4 method for character
Kobe(
  Code = "",
  Label = "",
  Description = "",
  Time = numeric(),
  TimeLab = "Year",
  Value = array(),
  Preset = list(),
  Target = 1,
  Limit = 1
)

# S4 method for list
Kobe(
  Code = "",
  Label = "",
  Description = "",
  Time = numeric(),
  TimeLab = "Year",
  Value = array(),
  Preset = list(),
  Target = 1,
  Limit = 1
)

# S4 method for Slick
Kobe(Code)

# S4 method for Slick
Kobe(Slick) <- value

Arguments

Code

A short code for the Performance Indicators for this object. A character string length nPI or a named list for multi-language support. See Details

Label

A short label for the Performance Indicators for this object. Used to label axes on charts. Can be longer than Code but recommended to keep short as possible so it shows clearly in plots and tables. A character string length nPI or a named list for multi-language support. See Details

Description

A description for the Performance Indicators for this object. Can include Markdown, see Examples. A character string length nPI or a named list for multi-language support. See Details

Time

A numeric vector with values for the projection time-steps. Must match length nTS in Value

TimeLab

Character string length 1. Name of the time step (e.g., 'Year'). Will be used as the label in the Kobe Time plot. Use a named list for multiple languages.

Value

A numeric array with the stochastic performance indicator values for each simulation (sim), operating model (OM), management procedure (MP), performance indicator (PI), and projection time-steps (nTS). Dimensions: c(nsim, nOM, nMP, nPI, nTS)

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().

Target

Numeric vector length nPI with the target value for the PIs. Defines the color quadrants on the Kobe plot. Defaults to c(1,1).

Limit

Numeric vector length nPI with the limit value for the PIs. Shows as red line on Kobe plot. NULL to ignore.

Slick

A Slick-class() object

value

A Kobe-class() object

Details

Objects of class Kobe are created with Kobe()

The Kobe plot typically shows B/BMSY (or something similar) on the x-axis, and F/FMSY (or something similar) on the y-axis.

Performance Indicators

The first PI will be on the x-axis (usually B/BMSY or something similar) and the second on the y-axis (e.g., F/FMSY)

Multi-Language Support

Text with multi-language supported can be provided as a named list. Available languages:

  • en: English (default)

  • es: Spanish

  • fr: French

Note

Character strings in Code, Label, and Description must all be same length as the number of performance indicators (nPIs) in Value

Functions

  • Kobe(missing): Create an empty Kobe object

  • Kobe(character): Create a populated Kobe object

  • Kobe(list): Create a populated Kobe object

  • Kobe(Slick): Return Kobe from a Slick-class() object

  • Kobe(Slick) <- value: Assign a Kobe-class() object to a Slick-class() object

Examples

kobe <- Kobe(Code=c('PI1', 'PI2', 'PI3'),
                   Label=c('Performance Indicator 1',
                           'Performance Indicator 2',
                           'Performance Indicator 3'),
                   Description = c('This is the description for PI 1',
                                   'This is the description for PI 2',
                                   'This is the description for PI 3'),
                   Value=array(runif(3000), dim=c(10, 10, 10,3)),
                   Preset=list('PI and P2'=1:2)

)

kobe
#> 
#> ── An object of class `Kobe` ───────────────────────────────────────────────────
#> 
#> ── `Code` ──
#> 
#> 1 PI1
#> 2 PI2
#> 3 PI3
#> 
#> ── `Label` ──
#> 
#> 1 Performance Indicator 1
#> 2 Performance Indicator 2
#> 3 Performance Indicator 3
#> 
#> ── `Description` ──
#> 
#> 1 This is the description for PI 1
#> 2 This is the description for PI 2
#> 3 This is the description for PI 3
#> 
#> ── `Time` ──
#> 
#> ── `TimeLab` ──
#> 
#> Year
#> 
#> ── `Value` ──
#> 
#> Error in data.frame(Dimension = dim_names, Length = dd): arguments imply differing number of rows: 5, 4

# ADD TIME

# Code(boxplot)
# Metadata(boxplot)
#
# # Value(boxplot)
# Value(boxplot) <- array()
#
# Preset(boxplot)
# Preset(boxplot) <- list()
#
# boxplot