glottobooster: Enhance glottolog data

View source: R/glottobooster.R

glottoboosterR Documentation

Enhance glottolog data

Description

This function restructures glottolog data, and optionally adds/removes data. If you want more flexibility in choosing which data to add/remove, you can use glottoboosterflex().

Usage

glottobooster(
  glottologdata = NULL,
  space = TRUE,
  addfamname = TRUE,
  addisolates = TRUE,
  L1only = TRUE,
  addfamsize = TRUE,
  addfamsizerank = TRUE,
  rename = TRUE
)

Arguments

glottologdata

data from glottolog, can be downloaded with glottoget("glottolog").

space

Return spatial object?

addfamname

Add column with familiy names?

addisolates

Add column to identify isolates?

L1only

Keep only L1 languages (remove bookkeeping, unclassifiable, sign languages, etc.).

addfamsize

Add column with family size?

addfamsizerank

Add column with family size rank?

rename

Rename columns "id" to "glottocode" and "iso639p3code" to "isocode"

Details

This function is used to generate 'glottobase' (the reference dataset used throughout the glottospace R package). The default options generate 'glottobase', which can be loaded directly using glottoget("glottobase").

Value

glottologdata object, either a spatial object (class: sf) or a data.frame.

See Also

Other <glottobooster>: glottoboosterflex()

Examples


glottologdata <- glottoget("glottolog")
glottobase <- glottobooster(glottologdata)


SietzeN/glottospace documentation built on June 15, 2024, 10:45 p.m.