Description Usage Arguments Value See Also Examples

A function is applied to subsets of `x`

where each subset consist of those observations with the same groupings in `y`

1 | ```
aveWithArgs(x, y, FUN = mean, ...)
``` |

`x` |
a vector to apply FUN to |

`y` |
a vector or list of vectors of grouping variables all of the same length as |

`FUN` |
function to apply for each factor level combination. |

`...` |
additional arguments to |

A numeric vector of the same length as `x`

where an each element contains the output from `FUN`

after `FUN`

was applied on the corresponding subgroup for that element (repeated if necessary within a subgroup).

1 2 | ```
aveWithArgs(1:10,rep(1:5,2))
aveWithArgs(c(1:9,NA),rep(1:5,2),max,na.rm=TRUE)
``` |

vipor documentation built on May 29, 2017, 9:38 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.