Skip to content
Prev 171357 / 398503 Next

Filtering a data frame using a string for colum header

I would have used

1) != rather than ! ... ==

2) !(names(my.df) %in% "DrHorrible")  since that handles NA names 
(possible, but not easy to get) better.

and note that

3) subset(my.df, select = -DrHorrible) works.
On Mon, 23 Feb 2009, Petr PIKAL wrote: