0

This allows me to delete single column:

a <- c(1,2,3,NA,5)
b <- c(1,2,3,4,5)
c <- c(1,2,3,4,NA)
d <- c(1,2,3,4,5)
z<-tibble(a, b, c, d)
z
z<-select(z, -starts_with('c'))
z

(More examples here: how to drop columns by passing variable name with dplyr? )

Now instead of giving name of single column I want to give a vector with column names that should be deleted. How to do that?

vasili111
  • 4,328
  • 6
  • 31
  • 58

0 Answers0