build_location_descriptions: Build Location Descriptions

View source: R/fallingfruit.R

build_location_descriptionsR Documentation

Build Location Descriptions

Description

A faster, vectorized alternative of build_location_description for single-type locations.

Usage

build_location_descriptions(type_strings, notes = NULL, note_sep = ". ",
  frequency = TRUE, frequency_in = "[]", ...)

Arguments

type_strings

Character vector of type strings.

notes

List of character vectors, each of the same length.

note_sep

Character string to seperate each element in notes.

frequency

Whether to display frequency before type_strings.

frequency_in

String of two characters in which to display the frequencies.

...

Arguments passed to other methods (unused).

Value

Character string of the summarized and concatenated values.

See Also

Other Falling Fruit functions: build_location_description, build_type_strings, expand_category_mask, get_ff_types, match_type_strings, normalize_type_strings, parse_type_strings

Examples

type_strings <- c("Apple", "Pear", "Pear")
notes <- list(
  c("Planted 1999", "Height 10 m"),
  c("Planted 1999", "Height 20 m"),
  c("Planted 1999", "Height 20 m")
)
build_location_descriptions(type_strings, notes)
notes <- list(c("Planted 1999", NA), c(NA, "Height 20 m"), c(NA, NA))
build_location_descriptions(type_strings, notes)
build_location_descriptions(type_strings, notes, frequency = FALSE)

falling-fruit/fruitr documentation built on Dec. 21, 2024, 8:32 p.m.