df_exclude_col {oaii}R Documentation

Remove columns from data.frame

Description

Remove columns from data.frame

Usage

df_exclude_col(df, col, on_missing_col = "warn")

Arguments

df

data.frame, input data.frame

col

character vector, column name(s) to be deleted

on_missing_col

string, behavior for missing column(s): "warn" - log warning, "skip" - skip missing column(s), "stop" - throw error

Value

Modified input data.frame

Examples

df <- data.frame(a = 1:3, b = 1:3, c = 1:3)
df_exclude_col(df, "b")
df_exclude_col(df, c("a", "c"))


[Package oaii version 0.5.0 Index]