Skip to content

equivalent of Stata "by construct"

3 messages · Pradipto Banerjee, Duncan Murdoch, Daniel Nordlund

#
On 27/09/2012 12:13 PM, Pradipto Banerjee wrote:
There's a by() function, and also the more general tapply().  There are 
also contributed packages with related functions, e.g. the sparseby() 
function in the reshape package.  I believe the reshape2 package has the 
same functionality, but I forget what function does it.

Duncan Murdoch
#
Check out the function by() in base R.

Dan

Daniel Nordlund
Bothell, WA USA