r dataframe remove column by name code example
Example 1: r data frame remove column
df$columnName <- NULL
Example 2: drop a column in r data frame
df <- df %>%
select(-column_to_drop)
df$columnName <- NULL
df <- df %>%
select(-column_to_drop)