extend | R Documentation |
Extend a regular series with missing values at the beginning or end by replacing the beginning missing values with the first non-missing value and replacing the ending missing values with the last non-missing value
extend(x)
x |
a numeric vector that represent a regular series. Missing values are permitted and are replaced with non-missing values. |
A vector like x
with missing value replaced.
Interior missing values should be replaced first with a function like
fillMissing
.
fillMissing
XT <- c(NA, NA, 1.2, 2.4, 3.5, NA) extend(XT)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.