Skip to content

Instantly share code, notes, and snippets.

@andilabs
Created September 9, 2013 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andilabs/6501685 to your computer and use it in GitHub Desktop.
Save andilabs/6501685 to your computer and use it in GitHub Desktop.
R: fast counting, aggreagating of values in data frame http://www.miskatonic.org/2012/09/24/counting-and-aggregating-r
library(plyr)
#zwroci tabele zawierajaca w pierwszej kolumnie liczbe ile-krotnie strona zostala oceniona, a w drugiej ile stron z calego zbioru dotyczyla tylokrotna ocena.
count(count(d_eval,"document_id"),"freq")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment