Answers for "drop columns in r using drop"

-1

R drop columns

undesired <- c('mpg', 'cyl', 'hp')

mtcars <- mtcars %>%
  select(-one_of(undesired))
Posted by: Guest on November-16-2020

Browse Popular Code Answers by Language