Skip to contents

VCN means "Volume Consécutif Minimal" in French :)

Usage

calcVCN(x, k, ...)

# S3 method for matrix
calcVCN(x, k, ...)

# S3 method for numeric
calcVCN(x, k, ...)

Arguments

x

numeric or matrix for respectively a time series and several times series

k

numeric period in days

...

further parameters to send to zoo::rollmean

Value

A 1-length numeric for a single time series, a numeric otherwise.

Examples

m <- matrix(rnorm(1000), ncol = 10)
calcVCN(m, 10)
#>  [1] -0.3047019 -0.7212571 -0.3766099 -0.8209985 -0.6997508 -0.6476162
#>  [7] -0.7518033 -0.9178172 -0.6100651 -0.4498603