glottojoin {glottospace} | R 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, rm.na = 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. |
rm.na |
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)
[Package glottospace version 0.0.112 Index]