Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.44.0202041224140.8778-100000@tal.stat.umu.se>
Date: 2002-02-04T11:24:49Z
From: Göran Broström
Subject: How do you delete variables from a data frame?
In-Reply-To: <003201c1ad65$ec2a93c0$f2e1f380@nottingham.ac.uk>

On Mon, 4 Feb 2002, Stuart Leask wrote:

> Is there a simple way of removing variables from a dataframe?
> 
> - rm(dataframe$VAR) doesn't seem to work
> - Copying all but the unwanted variables into a new data frame is awkward
> when there are a lot of variables.
> - I haven't found any references to this in the help files.

dataframe$VAR <- NULL

G?ran

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._