Learn R Programming

copre (version 0.2.1)

modes: Mode Extractor

Description

Extracts the modes from a copre_result or seqre_result object.

Usage

modes(obj, mean = FALSE, grd = NULL, idx = FALSE, anti = FALSE)

# S3 method for seqre_result modes(obj, mean = FALSE, grd = NULL, idx = FALSE, anti = FALSE)

# S3 method for grideval_result modes(obj, mean = FALSE, grd = NULL, idx = FALSE, anti = FALSE)

n_modes(obj, mean = FALSE, grd = NULL, anti = FALSE)

Value

A matrix of modes values in the support of the copre_result density

Arguments

obj

A copre_result or seqre_result object.

mean

A logical value indicating whether to count the modes of the mean density of each of the individual sampled density.

grd

For seqre_result, a grid on which to evaluate the object.

idx

A logical value indicating whether to also return the index within grd of the discovered modes.

anti

A logical value indicating whether to extract true modes or anti-modes (i.e. local minima of the density function).

Methods (by class)

  • modes(seqre_result): Mode-counting method for seqre_result objects.

  • modes(grideval_result): Mode-counting method for grideval_result objects.

Functions

  • n_modes(): Counts the modes from a copre_result or seqre_result object.