glottoclean {glottospace}R Documentation

Clean glottodata/glottosubdata

Description

This function cleans glottodata/glottosubdata and returns a simplified glottodata/glottosubdata object containing only the cleaned data table and a structure table.

Usage

glottoclean(glottodata, tona = NULL, tofalse = NULL, totrue = NULL, id = NULL)

Arguments

glottodata

glottodata (either a list or a data.frame)

tona

Optional additional values to recode to NA (besides default)

tofalse

Optional additional values to recode to FALSE (besides default)

totrue

Optional additional values to recode to TRUE (besides default)

id

By default, glottoclean looks for a column named 'glottocode', if the id is in a different column, this should be specified.

Details

This function has some built in default values that are being recoded: For example, if column type is 'symm' or 'asymm', values such as "No" and 0 are recoded to FALSE Values such as "?" are recoded to NA.

Value

A cleaned-up and simplified version of the original glottodata object

Examples

glottodata <- glottoget("demodata", meta = TRUE)
glottodata <- glottoclean(glottodata)

glottosubdata <- glottoget("demosubdata", meta = TRUE)
glottosubdata <- glottoclean(glottosubdata)

[Package glottospace version 0.0.112 Index]