Description Usage Arguments Details Value
Estimate densities of x
by each level of by
.
1 | estimate_density_groups(.data, x, by, limits, ...)
|
.data |
A data frame to use for |
x |
A variable to estimate density from. |
by |
A grouping-type variable (e.g., factor) to calculate |
... |
Any further parameters to |
Given a data.frame (.data
) with values in x
, estimate the density of x
separately for each of the levels of by
.
For instance, if by
is color
with values c("blue","red","green")
then
compute densities for x
separately for blue, red and green.
The return result of this function is a data frame with three columns: x, y and
by. The x,y values are the results of estimating density (see estimate_density()
)
and the value of by
is the specific level value from the by
variable.
A data.frame with three columns: x, y and by.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.