Description Usage Arguments Value
Online algorithm for updating a given average on new value TODO: check for numerical stability
1 | avg_update(avg, cnt, val, na.rm = TRUE)
|
avg |
The current average value |
cnt |
The count of elements before the new value |
val |
The new value |
na.rm |
Whether to remove NA values |
The updated average
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.