.fill_grps_from_variables {cards} | R Documentation |
This function back fills the values of group variables using
variable/variable_levels. The back filling will occur if the value of the
variable
column matches the name of a grouping variable, and the grouping
variable's value is NA
.
.fill_grps_from_variables(x)
x |
( |
data frame
data <- data.frame(
variable = c(rep("A", 3), rep("B", 2)),
variable_level = 1:5,
A = rep(NA, 5),
B = rep(NA, 5)
)
cards:::.fill_grps_from_variables(data)