Learn R Programming

biosurvey (version 0.1.1)

find_modes: 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

Run this code
# NOT RUN {
# Data
data("dist_list", package = "biosurvey")

dens <- density(dist_list$`12`)

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

Run the code above in your browser using DataLab