glottoclean | R Documentation |
This function cleans glottodata/glottosubdata and returns a simplified glottodata/glottosubdata object containing only the cleaned data table and a structure table.
glottoclean(glottodata, tona = NULL, tofalse = NULL, totrue = NULL, id = NULL)
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. |
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.
A cleaned-up and simplified version of the original glottodata object
glottodata <- glottoget("demodata", meta = TRUE) glottodata <- glottoclean(glottodata) glottosubdata <- glottoget("demosubdata", meta = TRUE) glottosubdata <- glottoclean(glottosubdata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.