Charles Berry <ccberry <at> ucsd.edu> writes:
[snip]
> 
> Katherine Gobin <katherine_gobin <at> yahoo.com> writes:

> > How to automatically identify and retain only one column (in this example
> column x) among the identical
> > columns besides other non-identical columns (viz. id, y and z).
> 
> See 
> 
> ?unique
> 
> Details
> 
> This is a generic function with methods for vectors, *data frames* and ...
> 
> [emphasis added]
> 
> So,
> 
>    unique( df, MARGIN=2 )
> 
> is what you want.
> 


My bad. Mea culpa, etc.

There is a data.frame method, but it ignores the MARGIN arg.

Better to stick with what David suggested:

  http://article.gmane.org/gmane.comp.lang.r.general/289881

HTH,

______________________________________________
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
and provide commented, minimal, self-contained, reproducible code.

Reply via email to