update_mean: Update the Covariance of a dataset

Description Usage Arguments Details Value Author(s) Examples

View source: R/update_mean.R

Description

The function updates the mean of a dataset when we have a new data by recursive formula

Usage

1
update_mean(old_mean, m, newx)

Arguments

old_mean

the mean of previous dataset

m

the number of data in your previous dataset

newx

value of your new data

Details

update_mean() can be used to update the mean of a large data set without recalculating the whole data set to make compuation easier. The function can be used to update univariate or multivariate data set.

Value

new mean

Author(s)

Xiulin Xie

Examples

1
update_mean(mean(c(1:13)),13,14)

XiulinXie/SPCmonitor2 documentation built on Dec. 10, 2019, 12:10 a.m.