Learn R Programming

tablesgg (version 0.9-1)

fill_NA_idx: Indices to Impute NA Elements of a Vector by LOCF

Description

Indices to impute NA elements of a vector by the last-observation-carried-forward method. This is an internal function, not intended to be called by package users.

Usage

fill_NA_idx(y)

Value

A vector of indices with the same length as y. If x <- y[fill_NA_idx(y)], then x will be y with NA values imputed by the last-observation-carried-forward method.

Arguments

y

A vector.