Learn R Programming

ForestElementsR (version 2.0.1)

summary.fe_species_tum_wwk_long: Summary of an fe_species_tum_wwk_long Vector

Description

Produces a summary for a fe_species_tum_wwk_long object in the same style as R does for factors. Actually, after some conversions summary.factor is called by this function. The species naming in the summary depends on the parameter spec_lang.

Usage

# S3 method for fe_species_tum_wwk_long
summary(
  object,
  spec_lang = options("fe_spec_lang")$fe_spec_lang,
  maxsum = 100L,
  ...
)

Value

A named vector in the same style as returned by summary.factor

Arguments

object

Object of class fe_species_tum_wwk_long

spec_lang

Choice of how species (group) names or id's are displayed in the summary. Supported choices are "code" (displays the species codes as they are), "eng" (English species names), "ger" (German species names), and "sci" (scientific species names). The names and the codes refer to the species coding given in the object's attribute species_coding. The default is to request the choice with options("fe_spec_lang"). If this option is not set, the choice "code" is used.

maxsum

Same as parameter maxsum in summary.factor

...

Other parameters (not used)

Examples

Run this code
# Construct some species id vector
spec_ids <- c(
  rep(fe_species_tum_wwk_long(c("10", "60", "87", "811")), each = 15),
  NA, NA
)

summary(spec_ids)
spec_ids |> summary()
spec_ids |> summary(spec_lang = "eng")

# Usual application: Set option for species code output
# Any summary of an fe_species object will use the last setting of the
# option
options(fe_spec_lang = "sci")
spec_ids |> summary()

Run the code above in your browser using DataLab