peak_functions: Peak Functions for Peak Detection in Univariate Time Series

Description Usage Arguments Value Author(s) Examples

Description

scorepeak package provides several types of peak function. See the vignette "Introduction to scorepeak" for detail.

Usage

1
2
3
4
5
score_type1(data, w, boundary = "reflecting")

score_type2(data, w, boundary = "reflecting")

score_type3(data, w, boundary = "reflecting")

Arguments

data

a numeric vector. Length of data must be greater than 1.

w

window size. w must be odd and greater than 2 and smaller than double length of data.

boundary

determines how data points in the beginning and end of the time series will be treated. "reflecting", "r": reflecting boundary condition, "periodic", "p": periodic boundary condition, "discard", "d", discarding data points in the beginning and end of the time series. See the vignette "Introduction to scorepeak" for detail.

Value

a numeric vector

Author(s)

Shota Ochi

Examples

1
2
3
4
5
data("ecgca102")
plot(ecgca102, type = "l", ylim = c(-0.38, 0.53))
points(seq(length(ecgca102)), score_type1(ecgca102, 51), col = "red", type = "l")
points(seq(length(ecgca102)), score_type2(ecgca102, 51), col = "blue", type = "l")
points(seq(length(ecgca102)), score_type3(ecgca102, 51), col = "green", type = "l")

Example output



scorepeak documentation built on Aug. 21, 2019, 9:05 a.m.