omit_dips: Replace element with NA if it is less than the elements...

View source: R/number_tools.R

omit_dipsR Documentation

Replace element with NA if it is less than the elements before and after it

Description

Replace element with NA if it is less than the elements before and after it

Usage

omit_dips(vec)

Arguments

vec

(Numeric) A vector.

Value

A Numeric vector.

Authors

Examples

tree_height_per_month <- c(1, 2, 3, 2, 4, 7, 7, 8)

omit_dips(tree_height_per_month)

#> [1]  1  2  3 NA  4  7  7  8


DesiQuintans/desiderata documentation built on April 9, 2023, 5:43 a.m.