which_tree: Tree numbers of glottolog families

View source: R/metadata.R

which_treeR Documentation

Tree numbers of glottolog families

Description

Returns the tree number of one or more glottolog families.

Usage

which_tree(family, glottolog_version)

Arguments

family

A character vector. Elements are names of glottolog families whose trees are to be returned. If family is left unspecified, all trees are returned.

glottolog_version

A character string, specifying which glottolog version to use. Currently available options are '4.0' through to '4.8' and '5.0'. If no value is specified then the newest available version is used.

Value

A named vector of integers, giving the tree numbers and the family names as the vector names.

Examples

which_tree("Caddoan")
which_tree(c("Caddoan", "Tangkic"), glottolog_version = "4.3")
# If some family names are unrecognized, a warning is issued
which_tree(c("Caddoan", "Zzz"), glottolog_version = "4.4")
## Not run: 
# If no family names are recognized, an error results
which_tree()
which_tree("Zzz")

## End(Not run)

erichround/glottoTrees documentation built on April 17, 2025, 10:47 a.m.