Skip to contents

Access or assign Code, Label, and Description for a valid object class

Usage

Code(object, lang = "en")

Code(object) <- value

Description(object, lang = "en")

Description(object) <- value

Label(object, lang = "en")

Label(object) <- value

# S4 method for Boxplot
Code(object, lang = "en")

# S4 method for Boxplot
Code(object) <- value

# S4 method for Boxplot
Description(object, lang = "en")

# S4 method for Boxplot
Label(object, lang = "en")

# S4 method for Boxplot
Label(object) <- value

# S4 method for Boxplot
Description(object) <- value

# S4 method for Kobe
Code(object, lang = "en")

# S4 method for Kobe
Code(object) <- value

# S4 method for Kobe
Description(object, lang = "en")

# S4 method for Kobe
Description(object) <- value

# S4 method for Kobe
Label(object, lang = "en")

# S4 method for Kobe
Label(object) <- value

# S4 method for MPs
Code(object, lang = "en")

# S4 method for MPs
Code(object) <- value

# S4 method for MPs
Label(object, lang = "en")

# S4 method for MPs
Label(object) <- value

# S4 method for MPs
Description(object, lang = "en")

# S4 method for MPs
Description(object) <- value

# S4 method for Quilt
Code(object, lang = "en")

# S4 method for Quilt
Code(object) <- value

# S4 method for Quilt
Description(object, lang = "en")

# S4 method for Quilt
Description(object) <- value

# S4 method for Quilt
Label(object, lang = "en")

# S4 method for Quilt
Label(object) <- value

# S4 method for Tradeoff
Code(object, lang = "en")

# S4 method for Tradeoff
Code(object) <- value

# S4 method for Tradeoff
Description(object, lang = "en")

# S4 method for Tradeoff
Description(object) <- value

# S4 method for Tradeoff
Label(object, lang = "en")

# S4 method for Tradeoff
Label(object) <- value

# S4 method for Timeseries
Code(object, lang = "en")

# S4 method for Timeseries
Code(object) <- value

# S4 method for Timeseries
Description(object, lang = "en")

# S4 method for Timeseries
Description(object) <- value

# S4 method for Timeseries
Label(object, lang = "en")

# S4 method for Timeseries
Label(object) <- value

# S4 method for Spider
Code(object, lang = "en")

# S4 method for Spider
Code(object) <- value

# S4 method for Spider
Description(object, lang = "en")

# S4 method for Spider
Description(object) <- value

# S4 method for Spider
Label(object, lang = "en")

# S4 method for Spider
Label(object) <- value

Arguments

object

An object of class MPs-class(), Boxplot-class(), Kobe-class(), Quilt-class(), Spider-class(), Timeseries-class(), or Tradeoff-class()

lang

Optional text string specifying the language (if available). Either 'en', 'es', or 'fr' for English, Spanish, or French respectively

value

A character vector or a named list for multi-language support

Details

Code, Label, and Description must all be equal length.

Multi-Language Support

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

  • en: English (default)

  • es: Spanish

  • fr: French

See Examples

Methods (by class)

Examples

boxplot <- Boxplot()

Code(boxplot) <- c('PI1', 'PI2', 'PI3')
Label(boxplot) <- c('Performance Indicator 1',
                    'Performance Indicator 2',
                    'Performance Indicator 3')
Description(boxplot) <- c('This is the description for PI 1',
                          'This is the description for PI 2',
                          'This is the description for PI 3')


Code(boxplot)
#> [1] "PI1" "PI2" "PI3"
Label(boxplot)
#> [1] "Performance Indicator 1" "Performance Indicator 2"
#> [3] "Performance Indicator 3"
Description(boxplot)
#> [1] "This is the description for PI 1" "This is the description for PI 2"
#> [3] "This is the description for PI 3"

# Slick Object
mySlick <- Slick()
Code(mySlick, 'Boxplot') <- Code(boxplot)
#> Error in `Code<-`(`*tmp*`, "Boxplot", value = c("PI1", "PI2", "PI3")): unused argument ("Boxplot")
Label(mySlick, 'Boxplot') <- Label(boxplot)
#> Error in `Label<-`(`*tmp*`, "Boxplot", value = c("Performance Indicator 1", "Performance Indicator 2", "Performance Indicator 3")): unused argument ("Boxplot")
Description(mySlick, 'Boxplot') <- Description(boxplot)
#> Error in `Description<-`(`*tmp*`, "Boxplot", value = c("This is the description for PI 1", "This is the description for PI 2", "This is the description for PI 3")): unused argument ("Boxplot")

Code(mySlick, type='Boxplot')
#> Error in Code(mySlick, type = "Boxplot"): unused argument (type = "Boxplot")
Label(mySlick, type='Boxplot')
#> Error in Label(mySlick, type = "Boxplot"): unused argument (type = "Boxplot")
Description(mySlick, type='Boxplot')
#> Error in Description(mySlick, type = "Boxplot"): unused argument (type = "Boxplot")

# Multi-Language
Description(boxplot) <- list(en=c('This is the English description for PI 1',
                                  'This is the English description for PI 2',
                                  'This is the English description for PI 3'),
                             es=c('This is the Spanish description for PI 1',
                                  'This is the Spanish description for PI 2',
                                  'This is the Spanish description for PI 3'),
                             fr=c('This is the French description for PI 1',
                                  'This is the French description for PI 2',
                                  'This is the French description for PI 3')
)

Description(boxplot)
#> [1] "This is the English description for PI 1"
#> [2] "This is the English description for PI 2"
#> [3] "This is the English description for PI 3"
Description(boxplot, 'es')
#> [1] "This is the Spanish description for PI 1"
#> [2] "This is the Spanish description for PI 2"
#> [3] "This is the Spanish description for PI 3"
Description(boxplot, 'fr')
#> [1] "This is the French description for PI 1"
#> [2] "This is the French description for PI 2"
#> [3] "This is the French description for PI 3"