find_modes: Find modes in a multimodal distribution

Description Usage Arguments Value Examples

View source: R/selectionEG_helpers.R

Description

Find modes in a multimodal distribution of values based on the density of such values.

Usage

1

Arguments

density

object of class density obtained using the function density.

Value

A data.frame containing the values corresponding to the modes and the density for those particular values.

Examples

1
2
3
4
5
6
7
8
# Data
data("dist_list", package = "biosurvey")

dens <- density(dist_list$`12`)

# Finding modes
modes <- find_modes(density = dens)
modes

biosurvey documentation built on Sept. 16, 2021, 1:07 a.m.