Re: [R] Calculating total observations based on combinations of variable values

2008-08-27 Thread hadley wickham
On Wed, Aug 27, 2008 at 12:11 PM, Josip Dasovic <[EMAIL PROTECTED]> wrote: > Hello: > > As someone making the move from STATA to R, I'm finding it difficult at times > to perform basic tasks in R, so forgive me if I've missed an obvious and > easily obtained solution to my problem. I've searche

Re: [R] Calculating total observations based on combinations of variable values

2008-08-27 Thread Henrique Dallazuanna
Try this: merge(aggregate(x$DAY, x[, c("YEAR", "MONTH")], length), data.frame(YEAR = unique(x$YEAR), MONTH = 1:12), all = T) On Wed, Aug 27, 2008 at 2:11 PM, Josip Dasovic <[EMAIL PROTECTED]> wrote: > Hello: > > As someone making the move from STATA to R, I'm finding it difficult at >

Re: [R] Calculating total observations based on combinations of variable values

2008-08-27 Thread Dylan Beaudette
On Wednesday 27 August 2008, Josip Dasovic wrote: > Hello: > > As someone making the move from STATA to R, I'm finding it difficult at > times to perform basic tasks in R, so forgive me if I've missed an obvious > and easily obtained solution to my problem. I've searched the help guides > and the

[R] Calculating total observations based on combinations of variable values

2008-08-27 Thread Josip Dasovic
Hello: As someone making the move from STATA to R, I'm finding it difficult at times to perform basic tasks in R, so forgive me if I've missed an obvious and easily obtained solution to my problem. I've searched the help guides and the archives and have not been able to find a solution that w