View source: R/cluster_events.R
density_cut | R Documentation |
Cut data based on density.
density_cut(.x, .k, .lower = 0.1, .upper = 2, .step = 0.1)
.x |
A numeric vector. |
.k |
Numeric giving the number of expected clusters. |
.lower, .upper |
The interval for possible value of adjust. |
.step |
A numeric giving the increment to adjust. Sometimes low values are needed to find a proper adjust value. |
A factor, see base::cut()
set.seed(1234)
.x <- c(rnorm(200, 0, 1), rnorm(200, 0.8, 1))
.k <- 2
density_cut(.x, .k)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.