gapFilling {RGENERATE} | R Documentation |
gapFilling
Description
It fills in a gab of a data frame by using generate
method
Usage
gapFilling(x = NULL, ...)
## Default S3 method:
gapFilling(x, objectForGeneration = NULL, ...)
## S3 method for class 'data.frame'
gapFilling(
x,
objectForGeneration = NULL,
max.filling = 2,
nofill.code = -9999,
...
)
Arguments
x |
object with gaps to fill |
... |
further argument for |
objectForGeneration |
object used for |
max.filling |
integer values: gap are filled if the previous |
nofill.code |
Alternative value to |
Examples
set.seed(122)
NSTEP <- 1000
x <- rnorm(NSTEP)
y <- x+rnorm(NSTEP)
z <- c(rnorm(1),y[-1]+rnorm(NSTEP-1))
df <- data.frame(x=x,y=y,z=z)
var <- VAR(df,type="none")
dfobs <- df
dfobs[20:30,2] <- NA
n <- nrow(df)
gp <- gapFilling(x=dfobs,objectForGeneration=var,max.filling=2)
[Package RGENERATE version 1.3.7 Index]