Skip to contents

Maps a JASP/jamovi/R result-table column header to a STATO ontology class when one exists, then to a metacheck-minted statistic term for the standard statistics STATO has no class for, and otherwise falls back to the header text itself as an untyped label. Every column therefore gets a type, so no column is ever dropped from the statistical-output export.

Usage

stato_type_column(header, call_fn = NULL)

Arguments

header

the column header string as rendered in the result table

call_fn

optional name of the R function that produced this result (e.g. "shapiro.test"), as carried by read_r_output(). When supplied it disambiguates headers that name different quantities in different tests – R prints a bare W for both Shapiro-Wilk's W and the Wilcoxon rank sum – which no header-only lookup can resolve. Ignored for GUI formats, which have no call.

Value

a list with annotationValue (the canonical label, or the header text when unmapped), termSource ("STATO", "metacheck", or ""), and termAccession (the term IRI, or "").

Details

termSource says which vocabulary answered: "STATO" for a verified STATO class, "metacheck" for a minted term (see .MC_STAT_LABELS for what each one means and why STATO has no equivalent), or "" when the header could not be typed at all.

Examples

stato_type_column("t")$annotationValue
#> [1] "t-statistic"
stato_type_column("p")$termAccession
#> [1] "http://purl.obolibrary.org/obo/STATO_0000700"