is_locf: Checks to see if a value in a vector is LOCF

View source: R/archive.R

is_locfR Documentation

Checks to see if a value in a vector is LOCF

Description

LOCF meaning last observation carried forward. lags the vector by 1, then compares with itself. For doubles it uses float comparison via dplyr::near, otherwise it uses equality. NA's and NaN's are considered equal to themselves and each other.

Usage

is_locf(vec, tolerance)

cmu-delphi/epiprocess documentation built on Oct. 29, 2024, 5:37 p.m.