Learn R Programming

Qploidy (version 1.0.1)

mode: Calculate the Statistical Mode

Description

This function returns the most frequent (modal) value in a vector. If there are multiple values with the same highest frequency, it returns the first one encountered.

Usage

mode(x)

Value

A single value representing the mode of the input vector.

Arguments

x

A vector of numeric, character, or factor values.