removeconsec: Remove Consecutive Maxima or Minima

Description Usage Arguments

View source: R/functions_phase.R

Description

removeconsec removes consecutive maxima or minima and keeps only the higher or lower value, respectively. The function makes sure no two maxima or minima appear consecutively. It is a helper function of phase_stats.

Usage

1
removeconsec(df, remove, notremove, mode)

Arguments

df

input data.frame.

remove

numeric, for which consecutive values are removed (i.e. maxima or minima).

notremove

numeric, for which consecutive values are not removed (i.e. maxima or minima).

mode

character, specifies whether consecutive maxima or minima are removed. Can either be "max" or "min".


treenet/treenetproc documentation built on June 16, 2021, 4:39 p.m.