May be this:

FRAME   <- FRAME[-c(NAME1, NAME2)]
or
FRAME<- subset(FRAME, select=(-NAME1, -NAME2))

bests

milton
On Tue, Sep 29, 2009 at 4:12 PM, Dennis Fisher <fisher@plessthan.com> wrote:

> Colleagues,
>
> Hopefully a simple problem: I want to delete a column with a known name
> from a dataframe.  I could write:
>
>        FRAME   <- FRAME[, names(FRAME) != NAMETODELETE]
> or
>        FRAME   <- FRAME[, !names(FRAME) %in% c(NAME1, NAME2, ETC)]
>
> Is there some simpler means to accomplish this?
>
> Dennis
>
>
> Dennis Fisher MD
> P < (The "P Less Than" Company)
> Phone: 1-866-PLessThan (1-866-753-7784)
> Fax: 1-415-564-2220
> www.PLessThan.com <http://www.plessthan.com/>
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]


