Hi!
Sorry, I made an error in the previous e-mail.
So try this:
by(df[,-1],df$id,function(x) apply(x,2,tabulate))
This gives you a list. You can rearrange it into a data frame or a 3d
array if you wish.
Regards,
Denes
> Hello everybody,
>
> I have a data frame in R which is similar to the
Hello everybody,
I have a data frame in R which is similar to the follows. Actually my real 'df'
dataframe is much bigger than this one here but I really do not want to confuse
anybody so that is why I try to simplify things as much as possible.
So here's the data frame.
id <-c(1,1,1,1,1,1,1,1
2 matches
Mail list logo