glottojoin: Join glottodata with other objects, datasets, or databases.

View source: R/glottojoin.R

glottojoinR Documentation

Join glottodata with other objects, datasets, or databases.

Description

Join glottodata with other objects, datasets, or databases.

Usage

glottojoin(glottodata, with = NULL, id = NULL, na.rm = FALSE, type = "left")

Arguments

glottodata

glottodata or glottosubdata

with

Optional: glottodata (class data.frame), a dist object (class dist), or the name of a glottodatabase ("glottobase" or "glottospace")

id

By default, data is joined by a column named "glottocode" or "glottosubcode". In case you want to join using another column, the column name should be specified.

na.rm

Only used when joining with a dist object. By default NAs are kept.

type

In case two glottodata objects are joined, you can specify the type of join: "left" (default), "right", "full", or "inner"

Value

glottodata or glottosubdata, either with or without metatables. Object is returned as a data.frame or list, depending on the input.

See Also

glottosplit

Examples


glottodata <- glottoget("demodata")
glottodata_space <- glottojoin(glottodata, with = "glottospace")
glottodata_base <- glottojoin(glottodata, with = "glottobase")

# Join with a dist object
glottodata <- glottoget("demodata", meta = TRUE)
dist <- glottodist(glottodata)
glottodata_dist <- glottojoin(glottodata, with = dist)

# Join glottosubdata tables:
glottosubdata <- glottocreate(glottocodes = c("yucu1253", "tani1257"),
variables = 3, groups = c("a", "b"), n = 2, meta = FALSE)
glottodatatable <- glottojoin(glottodata = glottosubdata)


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