Description Format Methods Author(s) Examples
It handles a stream of numbers and computes descriptive values without a prior knowledge of how many values you have. It basically computers values coming from a stream of numbers. 06 - January - 2020
An R6Class object
new()Object initialization
WelfordAlgorithm$new(keep = FALSE)
keepKeeps all values in memory. Default is FALSE to save memory.
clear()Empties out the list of values and resets all calculations
WelfordAlgorithm$clear()
push()Pushes one single element in the stream
WelfordAlgorithm$push(x)
xThe value to push in the stream
pushList()Pushes a list of values in the stream
WelfordAlgorithm$pushList(l)
lThe list to push in the stream
getDataValues()Returns a vector of values
WelfordAlgorithm$getDataValues()
numDataValues()Return the number of values processed so far
WelfordAlgorithm$numDataValues()
mean()Returns the mean
WelfordAlgorithm$mean()
variance()Return the variance
WelfordAlgorithm$variance()
standardDeviation()Returns the standard deviation
WelfordAlgorithm$standardDeviation()
print()Prints the current status of the stram
WelfordAlgorithm$print()
clone()The objects of this class are cloneable with this method.
WelfordAlgorithm$clone(deep = FALSE)
deepWhether to make a deep clone.
Alberto Calderone <sinnefa@gmail.com>
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.