fill_at: Fills a vector with either previous value if no fill is given...

Description Usage Arguments

View source: R/timeSeries.R

Description

Fills a vector with either previous value if no fill is given or with the fill argument if the predicate is true for the vector entry

Usage

1
fill_at(.v, .predicate = 0, .default = NA, .fill = NULL)

Arguments

.v

vector to fill

.predicate

either an atomic in this case values that are equal to it will be filled a formula: will be transformed to a function by calling as_mapper a function: will be used as is

.default

default value if no previous correct value was encountered

.fill

if set all element of the vector for which the predicate is true will be replaced by this value. If NULL, the previous correct value (or default if non encountered) will be used.


albertbuchard/r-pipeline documentation built on May 5, 2019, 6:57 p.m.