R 3.1.1
OS X

Colleagues

When I use the duplicated function, I often need to find both the duplicates 
and the original element that was duplicated.  This can be accomplished with:
        duplicated(OBJECT) | duplicated(OBJECT, fromLast=TRUE)

>From my perspective, an improvement in the duplicated function would be an 
>option that accomplishes this with a single call to the function.  This could 
>either be:
        1.  a new option: all=TRUE (pick whatever name makes sense)
        2.  allowing fromLast to take a new value (e.g., NA, in the spirit of 
the xpd option in par())

If my suggestion would yield unintended consequences, it can certainly be 
ignored.

Dennis

Dennis Fisher MD
P < (The "P Less Than" Company)
Phone: 1-866-PLessThan (1-866-753-7784)
Fax: 1-866-PLessThan (1-866-753-7784)
www.PLessThan.com




        [[alternative HTML version deleted]]

______________________________________________
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