This function retrieves the values associated with value labels
of an imported SPSS, SAS or STATA data set (via read_spss,
read_sas or read_stata).
Usage
get_values(x, sort.val = TRUE)
Arguments
x
a variable (vector) with attached value labels.
sort.val
logical, if TRUE (default), values of associated value labels
are sorted.
Value
The values associated with value labels from x
Details
Labelled vectors are numeric by default (when imported with read-functions
like read_spss) and have variable and value labels attached.
The value labels are associated with those values from the labelled vector.
This function returns the values associated with the vector's value labels,
which may differ from actual values in the vector (e.g. due to missings)
or are not represented in sorted order.