cumVar: A function to calculate a cumulative varianz for a given...

Description Usage Arguments Value Examples

Description

A function to calculate a cumulative varianz for a given Vector. It calculates the standard deviation from beginning of the vector to current position in vector

Usage

1
cumVar(v)

Arguments

v

numeric or integer vector to calculate the cumulative varianz

Value

Returns vector with length of input vector which contains cumulativ varianz to given point

Examples

1
2
3
4
5
6
7
 v <- c(1,4,5,7,7,1,2,NA,34,NA,NA,NA,2,4,76,8,9,2,2)
 y <- cumVar(v)
 y
 y[5]
 var(v[1:5])
 y[14]
 var(v[1:14])

Somtom/somtomlib documentation built on May 28, 2019, 3:16 p.m.