From a data frame as month and a continuous number id
data.frame( id = c(1,1,2,2,3), month = c("2011-02","2011-02","2011-02","2011-03","2011-01"))
How is it possible to extract the total number of month and have the frq for every id? Expected output:
data.frame(id = c(1,2,2,3), month = c("2011-02","2011-02","2011-03","2011-01"), frq = c(1,1,2,1)