densest: Find the densest value in the data.

View source: R/utils.R

densestR Documentation

Find the densest value in the data.

Description

This function assumes that data represents a continuous variable and finds a single value with the highest estimated density. This can be used to estimate the mode of the data. If there is only one value that value is returned. If multiple density maxima with the same density exist, their mean is returned.

Usage

densest(data)

Arguments

data

The input data.

Value

The densest value of data.


johrpan/geposan documentation built on Feb. 28, 2025, 3:48 a.m.