Learn R Programming

dplR (version 1.5.3)

tridas.vocabulary: Browse and Check Standard TRiDaS Vocabulary

Description

This function can be used to browse the TRiDaS vocabulary by category.

Usage

tridas.vocabulary(category = c("dating type", "measuring method",
                      "shape", "location type", "variable", "unit",
                      "remark", "dating suffix", "presence / absence",
                      "complex presence / absence", "certainty"),
                  idx = NA, term = NA, match.exact = FALSE)

Arguments

category
Vocabulary category as a character vector of length one. One of "dating type", "measuring method", "shape", "location type", "variable", "unit", "
idx
A numeric vector. Index to the character vector containing the vocabulary of the given category.
term
A character vector. One or more (partial) terms to look for in the given category.
match.exact
A logical value. If TRUE, partial matching of term is not used. Defaults to FALSE.

Value

  • In mode 1A character vector, same length as in idx
  • In mode 2A logical value
  • In mode 3A character vector, same length as in term
  • In mode 4A character vector

Details

The function has four usage modes:
  1. Whenidxis given, returns item numberidxin the givencategory. There may be several numbers inidx, in which case multiple items are returned.
  2. Whentermcontains one or more items andmatch.exactisTRUE, checks whether any of the terms is an exact match in the givencategory
  3. Whentermcontains one or more items andmatch.exactisFALSE, expands partial matches of the terms in the vocabulary of the givencategory
  4. When onlycategoryis given, returns the complete vocabulary in the givencategory

References

TRiDaS - The Tree Ring Data Standard, http://www.tridas.org/

See Also

read.tridas, write.tridas

Examples

Run this code
## Show all entries in category "measuring method"
tridas.vocabulary(category = "measuring")

## Show item number one in category "complex presence / absence"
tridas.vocabulary(category = "complex", idx = 1)

## Check whether "half section" exists in category "shape"
tridas.vocabulary(category = "shape", term = "half section",
                  match.exact = TRUE)

## Return unabbreviated matches to several queries in category "remark"
tridas.vocabulary(category = "remark",
                  term = c("trauma", "fire", "diffuse"))

Run the code above in your browser using DataLab