powered by
Remove columns from data.frame
df_exclude_col(df, col, on_missing_col = "warn")
Modified input data.frame
data.frame, input data.frame
character vector, column name(s) to be deleted
string, behavior for missing column(s): "warn" - log warning, "skip" - skip missing column(s), "stop" - throw error
df <- data.frame(a = 1:3, b = 1:3, c = 1:3) df_exclude_col(df, "b") df_exclude_col(df, c("a", "c"))
Run the code above in your browser using DataLab