carryforward: Carry forward/back imputation of a vector

Description Usage Arguments Functions Examples

View source: R/carryforward.R

Description

Fill in missing values by carrying forward (or back) the known values in a vector or factor.

Usage

1
2
3

Arguments

v

A numeric or character vector, or a factor, containing some missing values.

Functions

Examples

1
2
carryforward(c(NA,10,NA,23,19,NA,NA,NA,0,NA))
carryback(c(NA,10,NA,23,19,NA,NA,NA,0,NA))

stevetnz/stevesRfunctions documentation built on May 28, 2019, 8:21 a.m.