Skip to content
Prev 170132 / 398506 Next

How to count number of year per firm in panel data?

ave is also handy here:

DF$number <- ave(DF$year, DF$id, FUN = length)


On Wed, Feb 11, 2009 at 12:38 PM, Marc Schwartz
<marc_schwartz at comcast.net> wrote: