get_glottolog_trees: Glottolog trees by version

View source: R/topology.R

get_glottolog_treesR Documentation

Glottolog trees by version

Description

Returns a multiPhylo object containing all, or a requested subset, of the glottolog trees.

Usage

get_glottolog_trees(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.

Details

By default, trees are returned from the most recent version of glottolog. Alternatively, an older version of glottolog can be specified.

Value

A phylo object containing one glottolog tree, or a multiPhylo object containing multiple glottolog trees.

Examples


library(ape)
tree_totonacan <- get_glottolog_trees(family = "Totonacan")
tree_totonacan_v4.3 <- get_glottolog_trees("Totonacan", "4.3")
plot(tree_totonacan)
plot(tree_totonacan_v4.3)
trees <- get_glottolog_trees(family = c("Caddoan", "Tangkic"))
plot(trees[[1]])
plot(trees[[2]])

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