meanUnique: Calulate mean or take unique elements of a vector

Description Usage Arguments Value Examples

View source: R/meanUnique.R

Description

A function that calulate mean or take unique elements of a vector.

Usage

1

Arguments

x

a vector

Value

If x is numeric, returns the mean. Otherwise, returns the unique elements of x.

Examples

1
2
3
4
x <- 1:5
meanUnique(x)
x=c("a","a","b")
meanUnique(x)

CytoDx documentation built on Nov. 8, 2020, 11 p.m.