mode_fun | R Documentation |
approximate mode from numeric vector (e.g. to indicate peak of density plot) takes numeric vector, outputx x axis value of y axis peak https://stackoverflow.com/questions/13133297/calculating-peaks-in-histograms-or-density-functions ... for use in ggridges::geom_density_ridges to ignore second parameter of quantiles
mode_fun(vector, ...)
vector |
numeric vector from which to calculate mode |
... |
additional parameters, not used |
# basic usage
m <- mode_fun(c(1,2,2,3,4,2,5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.