cmp_varlabs | R Documentation |
Compare the variable labels between a list of dataframes
cmp_varlabs(l)
l |
A list of dataframes. |
A dataframe comparing the varlab
s for all variables in the
dataframes. The logical column varlab_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 <- df %>% dplyr::mutate(new_var = 1) attr(df2$new_var, "label") <- "some variable label" attr(df2$sex, "label") <- NULL cmp_varlabs(list(df, df2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.