SciencesPo (version 1.3.7)

fill.forward: fill NA by previous cell value (fill forward)

Description

fillForward will carry values forward from one observation to the next, filling in missing values with the previous value.

Usage

fill.forward(var)

Arguments

var
the column that contains NAs

Examples

Run this code
view(ssex)

with(ssex, fill.forward(Favor))

Run the code above in your browser using DataLab