infillxy | R Documentation |
Infill all the missing values (NA) in x
with the corresponding values in sim
.
infillxy(x, ...)
## Default S3 method:
infillxy(x, sim, ...)
## S3 method for class 'matrix'
infillxy(x, sim, ...)
## S3 method for class 'data.frame'
infillxy(x, sim, ...)
x |
numeric, data.frame or matrix in which some values are missing (NA). |
sim |
numeric, data.frame or matrix, with the same dimension of |
... |
further arguments passed to or from other methods. |
It gives as a result an object of the same dimension of x
, in which all the NA values were infilled with the corresponding values of sim
.
Mauricio Zambrano-Bigiarini, mzb.devel@gmail
obs <- c(1, NA, 3, 4, NA, 5)
sim <- rep(2, 6)
## Filling in the missing values in 'x' with the corresponding values in 'sim'
infillxy(x=obs, sim)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.