Skip to content

Instantly share code, notes, and snippets.

@inkhorn
Created March 27, 2012 02:05
Show Gist options
  • Save inkhorn/2211718 to your computer and use it in GitHub Desktop.
Save inkhorn/2211718 to your computer and use it in GitHub Desktop.
LengthBy
LengthBy = function(y, x) {
tapply(!is.na(y), x, sum) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment