Skip to content
Prev 358343 / 398498 Next

Table

Hi Val,

Does this help:

library(plyr)
ddply(as.data.frame(xc3), .variables = "xc1", summarise, d1 = sum(xc2 ==
0), d2 = sum(xc2 == 1))

You could also try
aggregate(xc3, by = list(xc1, xc2), FUN = sum)

and modify the output.

Best,
Ulrik
On Thu, 11 Feb 2016 at 04:12 Val <valkremk at gmail.com> wrote: