Description Usage Arguments Examples
Smooth a condensed data frame.
1 2 |
x |
a condensed summary |
h |
numeric vector of bandwidths, one for each grouping variable in
|
var |
variable to smooth |
grid |
a data frame with the grouping colums as x. In order for the
factored version of |
type |
type of smoothing to use. Current options are |
factor |
if |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | x <- runif(1e5)
xsum <- condense(bin(x, 1 / 100))
xsmu1 <- smooth(xsum, 5 / 100)
xsmu2 <- smooth(xsum, 5 / 100, factor = FALSE)
# More challenging distribution
x <- rchallenge(1e4)
xsum <- condense(bin(x, 0.1))
xsmu <- smooth(xsum, 1)
plot(xsum$x, xsum$.count, type = "l")
lines(xsmu$x, xsmu$.count, col = "red")
xsmu2 <- smooth(xsum, 1, type = "regress")
plot(xsmu$x, xsmu$.count, type = "l", xlim = c(0, 50))
lines(xsmu2$x, xsmu2$.count, col = "red")
# Note difference in tails
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.