Skip to content
Prev 311761 / 398506 Next

subsetting - questions

Hello Peter,

1.     -c("X3", "X4", "X5") 
For the above variables, class is integer.

Arun has suggested the following:

df[df$X1>=8,][-which(names(df)%in% c("X3","X4","X5"))]

2.    df[df$X1>=8,] [, !names(df) %in% drop_var]

I agree - Arun has also suggested the same.

Thanks and regards,

Pradip