baptiste auguie-2 wrote:
> 
> 
> ddply(d, .(website), transform, count = table(user_id)) # why two new
> columns? 
> 
> 

Try this to see why:

  as.data.frame(table(d$user_id))

This works more like you expect:

  ddply(d, .(website), transform, count = unclass(table(user_id)))  

- Tom
-- 
View this message in context: 
http://www.nabble.com/plyr-and-table-question-tp22865174p22868047.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to