Warn and remove existing variables from a data frame
warn_removal.Rd
Warn and remove existing variables from 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 will be removed from df
.
Examples
df <- data.frame(x = 1, y = 2)
warn_removal(df, c("x", "z"))
#> Error in warn_removal(df, c("x", "z")): could not find function "warn_removal"