find_modes {biosurvey}R Documentation

Find modes in a multimodal distribution

Description

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

Usage

find_modes(density)

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

# Data
data("dist_list", package = "biosurvey")

dens <- density(dist_list$`12`)

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

[Package biosurvey version 0.1.1 Index]