Learn R Programming

naniar (version 0.6.0)

update_shadow: Expand all shadow levels

Description

Internal function to appropriately expand and relevel all shadow variables to include a new suffix

Usage

update_shadow(data, suffix)

Arguments

data

data.frame

suffix

character vector

Value

data.frame with adjusted levels

Examples

Run this code
# NOT RUN {
 
# }
# NOT RUN {
df <- tibble::tribble(
~wind, ~temp,
-99,    45,
68,    NA,
72,    25
)


dfs <- bind_shadow(df)

# update_shadow(dfs, "weee")
# update_shadow(dfs, "weee") %>% what_levels()
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab