fill_missing_last {fillr}R Documentation

Fill missing last

Description

Fill all missing values in a vector with the last value if it is known.

Usage

fill_missing_last(x, min_known_n = NULL, min_known_p = NULL)

Arguments

x

The vector to fill

min_known_n

numeric value: the minimum number of not-missing values

min_known_p

numeric value between 0 and 1: the minimum fraction of not-missing values

Value

a filled vector

Examples

fill_missing_last(c(1, 2, NA))
fill_missing_last(c(NA, 1, 2, NA))

[Package fillr version 1.0.0 Index]