filldown: Fill down NA with the last observed observation

View source: R/RcppExports.R

filldownR Documentation

Fill down NA with the last observed observation

Description

Fill down missing values with the latest non-missing value

Usage

filldown(x)

Arguments

x

A vector

Value

A vector or list with the NA's replaced by the last observed value.

Author(s)

Claus Ekstrom <claus@rprimer.dk>

Examples


a <- c(1:5, "Howdy", NA, NA, 2:3, NA)
filldown(a)
filldown(c(NA, NA, NA, 3:5))


MESS documentation built on Aug. 21, 2023, 1:05 a.m.

Related to filldown in MESS...