Description Usage Arguments Examples
Replace missing values using local polynomial regression
1 |
data |
a data.frame. |
formula |
an object of class " |
... |
further arguments passed to |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | na_loess( c(NA, 1, 2, NA, 4, NA, NA, NA, 8))
dat <- mtcars
dat$disp[sample.int(nrow(dat), 10)] <- NA
na_loess(dat, disp ~ mpg + cyl)
set.seed(123)
x <- sin(seq(-4, 4, length.out = 120))
x <- rnorm(120, x, 0.5)
x[sample.int(length(x), 20)] <- NA
plot(x)
points(which(is.na(x)), na_loess(x)[is.na(x)], col = "red", pch = 16)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.