repeat_last: Replace NA by last known value

View source: R/repeat_last.R

repeat_lastR Documentation

Replace NA by last known value

Description

Replace NA in a vector by the last known value.

Usage

repeat_last(x, forward = TRUE, maxgap = Inf, na.rm = FALSE)

Arguments

x

Vector.

forward

Logical.

maxgap

Numeric.

na.rm

Logical.

Value

Vector

Author(s)

Nicolas Mangin


NicolasJBM/collectR documentation built on June 9, 2025, 11:49 a.m.