Skip to content
Prev 389312 / 398506 Next

alternative to subset(dataframe, select = - column) in R

If you correct my typo as my followup message indicated, match() works
fine. As does logical indexing with %in%. The != version will work for
your query, but does not generalize to deleting several columns. The
point is to heed Jeff N's advice.


Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Fri, Sep 24, 2021 at 12:43 PM Luigi Marongiu
<marongiu.luigi at gmail.com> wrote: