On 7/9/07, Peter Dalgaard <[EMAIL PROTECTED]> wrote:
> Andrew Yee wrote:
> > Thanks.  But in this specific case, I would like the output to include
> > all three columns, including the "ignored" column (in this case, I'd
> > like it to ignore column a).
> >
> df[!duplicated(df[,c("a","c")]),]
>
> or perhaps
>
> df[!duplicated(df[-2]),]

Yes - of course.  I was momentarily confused about unique vs. duplicated.  Oops!

Hadley

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to