middle_negative_test: middle_negative_test

Description Usage Arguments Examples

View source: R/day4.R

Description

For the D4 Method, we need to have four consecutive changes, the ends of which are positive, and at most one of the two middles is negative. This function takes the changes and returns a logical vector of TRUEs when at most one of the two middles is negative.

Usage

1

Arguments

dx

A sequential change of SWE values. This is a vector object.

Examples

1
2
x <- c(1, -2, -1, 0, 0, -4, 5, 0, 3, -1, 0, -2, -1, 3)
rdailychange:::middle_negative_test(x)

Kinekenneth48/rdailychange documentation built on Dec. 18, 2021, 3:34 a.m.