Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fill

Fill Missing Values


Description

Fill a missing value (NA) with any of previous value, next value, or a user supplied value.

Usage

fill.fwd(x)
fill.bwd(x)
fill.value(x,value)

Arguments

x

An Fts object

value

a value to replace the missing values

Value

an Fts object

Author(s)

Whit Armstrong

Examples

x <- fts(index=seq(from=Sys.Date(),by="days",length.out=50),rnorm(50))
x[x > 0,] <- NA
fill.fwd(x)

x <- fts(index=seq(from=Sys.Date(),by="days",length.out=50),rnorm(50))
x[x > 0,] <- NA
fill.bwd(x)

x <- fts(index=seq(from=Sys.Date(),by="days",length.out=50),rnorm(50))
x[x > 0,] <- NA
fill.value(x,100.0)

fts

R Interface to 'tslib' (a Time Series Library in C++)

v0.9.9.2
GPL-3
Authors
Whit Armstrong <armstrong.whit@gmail.com>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.