Skip to content
Prev 32684 / 398526 Next

How to remove a complete dataframe column

On Fri, 30 May 2003, Mark Marques wrote:

            
You make a copy selecting the names you want, as in

rtu2 <- rtu[!(names(rtu) %in% c("Ri", "another I do not want"))]

or

rtu3 <- rtu[c("var2", "var7")]