Skip to content
Prev 345757 / 398502 Next

duplicated function

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)
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