Skip to contents

take a vector of column names and delete the columns if they are present in the data.table

Usage

delete_columns(df, cols_to_delete, make_unique = FALSE)

Arguments

df

A data.table or data.frame from which columns shall be deleted

cols_to_delete

character vector with names of columns to be deleted

make_unique

whether to make the data set unique after removing columns

Value

A data.table