Sudharsan
0
Q:

R drop columns

#drop columns by index
df <- mydata[ -c(1,3:4) ]
#drop columns by name
df = subset(mydata, select = -c(x,z))
0
undesired <- c('mpg', 'cyl', 'hp')

mtcars <- mtcars %>%
  select(-one_of(undesired))
0

New to Communities?

Join the community