drop column table r code example
Example 1: how to drop a column in r
keeps <- c("y", "a")
DF[keeps]
Example 2: drop a column in r data frame
df <- df %>%
select(-column_to_drop)
keeps <- c("y", "a")
DF[keeps]
df <- df %>%
select(-column_to_drop)