Description Usage Arguments Details Examples
Transform condensed objects, collapsing unique bins.
1 2 3 |
... |
named arguments evaluated in the context of the data |
data,'_data' |
a condensed summary |
You don't need to use rebin
if you use transform: it will
automatically rebin for you. You will need to use it if you manually
transform any grouping variables.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | x <- runif(1e4, -1, 1)
xsum <- condense(bin(x, 1 / 50))
# Transforming by hand: must use rebin
xsum$x <- abs(xsum$x)
rebin(xsum)
if (require("ggplot2")) {
autoplot(xsum) + geom_point()
autoplot(rebin(xsum)) + geom_point()
}
#' Transforming with transform
y <- x ^ 2 + runif(length(x), -0.1, 0.1)
xysum <- condense(bin(x, 1 / 50), z = y)
xysum <- transform(xysum, x = abs(x))
if (require("ggplot2")) {
autoplot(xysum)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.