cmp_vallabs | R Documentation |
Compare the value labels between a list of dataframes
cmp_vallabs(l)
l |
A list of dataframes. |
A dataframe comparing the vallab
s for all labelled values of the variables in the
dataframes. The logical column vallab_diff
indicates, if there are
differences.
df <- data.frame(fbnr = 1:10, sex = haven::labelled(c(2, 1, 2, 1, 1, 2, 2, 1, 2, 1), label = "sex", labels = c(MALES = 1, FEMALES = 2)), age = c(24, 23, 23, 41, 23, 39, 30, 18, 31, 48)) df2 <- data.frame(fbnr = 1:10, sex = haven::labelled(c(2, 1, 2, 1, 1, 2, 2, 1, 2, 1), label = "sex", labels = c(m = 0, f = 1)), age = c(24, 23, 23, 41, 23, 39, 30, 18, 31, 48)) cmp_vallabs(list(df, df2)) # The values are ordered by appearance in the dataframes. Compare: cmp_vallabs(list(df2, df))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.