Warn and replace existing variables in a data frame
warn_replace.Rd
Warn and replace existing variables in a data frame
Details
This function checks if any of the variables in vars
are already present in df
.
If any are found, a warning is issued and the variables are replaced from df
.
Examples
df <- data.frame(x = 1, y = 2)
warn_replace(df, c("x", "z"))
#> Error in warn_replace(df, c("x", "z")): could not find function "warn_replace"