.fill_grps_from_variables {cards} | R Documentation |
Back Fill Group Variables
Description
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
.
Usage
.fill_grps_from_variables(x)
Arguments
x |
( |
Value
data frame
Examples
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)
[Package cards version 0.6.1 Index]