Source Value Labels for an IRW Table's Coded Covariates
Source:R/covariate-labels.R
irw_covariate_labels.RdMany covariates ship as bare codes – cov_gender in {1, 2} – whose
meaning was recorded in the source file (an SPSS or Stata value label) but
is not in the IRW table, and the meaning differs from table to table:
cucchi_2018_rfq codes 1 = female, rowe_2016_cfs_strain
1 = male. This returns the source's own labels, one row per code, from
irw_meta's covariate_labels table. It does not touch the response
data, and irw_fetch() output is unchanged.
Value
A tibble with character columns table, covariate,
code, label, one row per code, sorted by table, covariate
and code. code is the shipped value written as text (a shipped
1.0 is "1"). label is the source's wording, verbatim
and not harmonised across tables, or the literal
"[institution name withheld]" where the codes name institutions.
Only codes that occur in the shipped column are listed, and a covariate
may be partly covered. Zero rows, with a message, when IRW has no labels
for the table.
If the irw_meta version in use has no covariate_labels table (an
older or pinned version), this is an error of class
irw_covariate_labels_unavailable, not an empty result, so it cannot
be mistaken for "no labelled covariates".
See also
irw_covariates, whose labels = TRUE applies
these labels.