Description Usage Arguments Value
Apply a function over a dataframe after splitting along some "over" variable
1 2 3 4 5 6 7 8 |
applyfun |
The character name of a function to apply. |
applyargs |
A named list of arguments supplied to applyfun. |
fallbackargs |
A named list of arguments to replace arguments in applyargs if the call to applyfun results in an error. Any arguments in applyargs that are not named in fallbackargs will be reused. |
settosplit |
A dataframe that will be split by the 'over' parameter below. |
nameaftersplit |
The name of the argument of applyfun that takes the settosplit dataframe after it has been split; this is commonly 'x' or 'data' |
over |
The name of the factor variable in settosplit, over which it should be split. |
This function returns a named list of results, having applied applyfun to settosplit for every level of the 'over' variable. So for example, applyover(...)[["a"]] is the result of applyfun(data[data$over == 'a']).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.