Skip to content
Prev 263227 / 398502 Next

omitting columns from a data frame

Hi Erin,
As you've seen from the responses so far there are many ways to do it.
I like to do

xm1[setdiff(names(xm1), c("x1", "x2", ...))]

where xm1 is the data.frame, and "x1", "x2", ... are the columns you
wish to exclude. Just another option.

Best,
Ista
On Mon, Jun 20, 2011 at 11:52 PM, Joshua Wiley <jwiley.psych at gmail.com> wrote: