meanOrMode: Return mean if variable is numeric or mode if variable is...

View source: R/meanOrMode.R

meanOrModeR Documentation

Return mean if variable is numeric or mode if variable is character or factor.

Description

Return mean if variable is numeric or mode if variable is character or factor.

Usage

meanOrMode(x)

Arguments

x

(numeric, character or factor). Vector from which the mean or mode will be computed for.

Value

(numeric for mean or character for mode). Mean or mode value.


pablosanchezmart/TrEvol documentation built on April 23, 2024, 4:05 p.m.