[R] How to exclude a column by name?

Wacek Kusnierczyk Waclaw.Marcin.Kusnierczyk at idi.ntnu.no
Wed May 27 18:28:09 CEST 2009


Dieter Menne wrote:
> Peter Dalgaard <P.Dalgaard <at> biostat.ku.dk> writes:
>
>   
>> Or, BTW, you can use within()
>>
>> aq <- within(airquality, rm(Day))
>>     
>
> Please add this as an example to the docs of within. 
>   

possibly with the slightly more generic

    unwanted <- 'Day'
    aq <- within(airquality, rm(list=unwanted))

vQ




More information about the R-help mailing list