gapFilling | R Documentation |
It fills in a gab of a data frame by using generate
method
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, ... )
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 |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.