fill_down: Fill Down

View source: R/fill_down.R

fill_downR Documentation

Fill Down

Description

Fill missing value with most recent non-missing value

Usage

fill_down(x, empty_string = FALSE, reverse = FALSE)

Arguments

x

An atomic vector

empty_string

Should empty strings be treated as NA?

reverse

Should we fill up instead?

Author(s)

Sven Halvorson

Examples

NM = c(NA, 'Ruidoso', NA, '', NA, 'Corona', NA, 'Roswell')
fill_down(NM)
fill_down(NM, empty_string = TRUE)
fill_down(NM, reverse = TRUE)

svenhalvorson/SvenR documentation built on Aug. 25, 2023, 1:31 p.m.