Description Usage Arguments Details Value Author(s) References Examples
Impute NA
values using other values in the vector.
1 2 3 4 |
x |
A vector with some missing values and some non-missing values. |
locf
implements “last observation carried forward”: NA
's are imputed with
the most recent non-NA
value. nocb
is the complement: “next observation
carried backward”: NA
's are imputed with the next non-NA
value. forbak
first executes locf
, then nocb
, so that even leading NA
s are imputed.
If even one non-NA
value is present, forbak
should not return any NA
s. bakfor
does the reverse.
A vector of the same class as x
.
Tim Bergsma
http://metrumrg.googlecode.com
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.