Skip to content
Back to formatted view

Raw Message

Message-ID: <1264334330177-1288617.post@n4.nabble.com>
Date: 2010-01-24T11:58:50Z
From: Dimitri Shvorob
Subject: Is there a quicker way to drop a data frame column than setting it to NULL?

If I want to drop columns x, y, z from dataframe df, is there a better
alternative to

df$x = NULL
df$y = NULL
df$z = NULL

There are sufficiently many columns remaining to make 

df = subset(df, select = c(a,b,c,d[etc]))

cumbersome.

Thank you.
-- 
View this message in context: http://n4.nabble.com/Is-there-a-quicker-way-to-drop-a-data-frame-column-than-setting-it-to-NULL-tp1288617p1288617.html
Sent from the R help mailing list archive at Nabble.com.