nzlength: Non-zero length

Description Usage Arguments Value Author(s) Examples

View source: R/nzlength.R

Description

Find dataset series non-zero length and identify series over or equal to threshold.

Usage

1
nzlength(y,t=NULL,outplot=c(FALSE,TRUE))

Arguments

y

Dataset, each column is a series.

t

Threshold to compare length with. Use NULL if not needed.

outplot

If TRUE produce plot of the cumulative distribution of lengths.

Value

data.length

ector with non-zero length of each time series.

index

Logical vector of series that are above or equal to threshold.

Author(s)

Nikolaos Kourentzes

Examples

1
2
3
x <- abs(matrix(cumsum(rnorm(5400,0,1)),36,150))
x[1:20,1:50] <- 0
nzlength(x,30,outplot=TRUE)

trnnick/TStools documentation built on Sept. 14, 2019, 5:22 a.m.