4 Feb 2002, 10:40 UTC
Re: [R] How do you delete variables from a data frame?
- From
- Jens Nieschulze jniesch@gwdg.de
- Date
- Mon, 4 Feb 2002 02:40:56 -0800 (PST)
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 % % %Stuart %Dr Stuart Leask MA MRCPsych, Clinical Lecturer in Psychiatry %University of Nottingham Dept of Psychiatry, Duncan Macmillan House %Porchester Road, Nottingham. NG3 6AA. UK %http://www.nottingham.ac.uk/psychiatry/staff/sjl.html % %-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- %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@stat.math.ethz.ch %_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ % *********************************************************************** Jens Nieschulze Institute for Forest Biometrics & Phone: ++49-551-39-12107 Applied Computer Science Fax : ++49-551-39-3465 Buesgenweg 4 37077 Goettingen E-mail: jniesch@uni-forst.gwdg.de GERMANY http://www.uni-forst.gwdg.de/~jniesch -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._