Learn R Programming

glottospace (version 0.0.112)

glottocheck: Quality check of glottodata or glottosubdata

Description

This function first checks whether a dataset is glottodata or glottosubdata, and depending on the result calls glottocheck_data or glottocheck_subdata.

Usage

glottocheck(glottodata, diagnostic = TRUE, checkmeta = FALSE)

Arguments

glottodata

User-provided glottodata

diagnostic

If TRUE (default) a data viewer will be opened to show the levels of each variable (including NAs), and a data coverage plot will be shown.

checkmeta

Should metadata be checked as well?

Value

Diagnostic messages highlighting potential issues with glottodata or glottosubdata.

Details

It subsequently checks whether:

  • one column exists with the name "glottocode"

  • there are rows without a glottocode (missing IDs)

  • there are rows with duplicated glottocodes (duplicate IDs)

  • all variables have at least two levels

  • all glottocodes are valid

Examples

Run this code
# NOT RUN {
glottodata <- glottoget("demodata")
glottocheck(glottodata, diagnostic = FALSE)
# }

Run the code above in your browser using DataLab