sumBy = function( x, groups ){ result <- sapply( 1:max(groups), function ( g ) sum( x[ groups == g ] ) ) }
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.