na.fill

0th

Percentile

Fill NA or specified positions.

Generic function for filling NA values or specified positions.

Keywords
ts
Usage
na.fill(object, fill, ...)
## S3 method for class 'ts':
na.fill(object, fill, ix, \dots)
## S3 method for class 'zoo':
na.fill(object, fill, ix, \dots)
## S3 method for class 'default':
na.fill(object, fill, ix, \dots)
Arguments
object
an object.
fill
a three component list or a vector that is coerced to a list. Shorter objects are recycled. The three components represent the fill value to the left of the data, within the interior of the data and to the right of the data, respect
ix
logical. Should be the same length as the number of time points. Indicates which time points not to fill. This defaults to the non-NA values.
...
further arguments passed to methods.
Details

Fill NA or indicated values.

See Also

na.approx

Aliases
  • na.fill
  • na.fill.ts
  • na.fill.zoo
  • na.fill.default
Examples
z <- zoo(c(NA, 2, NA, 1, 4, 5, 2, NA))
na.fill(z, "extend")
na.fill(z, c("extend", NA))
na.fill(z, -(1:3))
na.fill(z, list(NA, NULL, NA))
Documentation reproduced from package zoo, version 1.7-0, License: GPL-2

Community examples

Looks like there are no examples yet.