I was wondering how it was possible to drop a number of columns from a dataframe/datatable using a vector of column names within a pipeline. Up until now I'm trying something like this:
del_cols <- c("colname 1", "colname 2", "colname 4")
new_data <- old_data %>%
select_(del_cols)
However, this is not working. I also tried defining the columns to be removed as follows:
del_cols <- c("colname 1, colname 2, colname 4")
But this turned up to fail as well.
Any help would be appreciated!