Skip to contents

This function returns the columns of a data frame excluding those specified.

Usage

columns_of_df_except(df, ex)

Arguments

df

A data frame from which column names will be retrieved.

ex

A character vector of column names to exclude.

Value

A data frame with columns excluding those in ex.

Examples

df <- data.frame(a = 1:3, b = 4:6, c = 7:9)
columns_of_df_except(df, c("b", "c"))
#> [1] 1 2 3