I have the following dataset :
prod month count
sub12 2012-06 566
sub1 2012-06 10239
sub6 2012-06 524
sub12 2012-07 2360
sub1 2012-07 13853
sub6 2012-07 2352
sub12 2012-08 3950
sub1 2012-08 14738
sub6 2012-08 4104
I'm trying to have this :
prod 2012-06 2012-07
sub12 566 2360
sub1 10239 13853
sub6 524 2352
I've run the following command lines:
aperm(table(data))
data.frame(table(data))
but I'm getting the wrong results.
Where am I wrong, please?