Skip to content
Back to formatted view

Raw Message

Message-ID: <FC7C20DD-3754-4D9D-A5AF-04D4DFE7A4F4@plessthan.com>
Date: 2014-11-18T15:23:41Z
From: Dennis Fisher
Subject: 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)

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