Remove specified columns from a dataframe if they exist.
Usage
remove_cols_from_df(df, columns_to_remove)
Arguments
- df
A dataframe.
- columns_to_remove
character vector specifying the names of columns to be removed.
Value
dataframe with specified columns removed if they exist.