Learn R Programming

taRifx (version 1.0.6.2)

homogenous: Returns whether a vector is homogenous or not

Description

Returns TRUE/FALSE if every element of vector is identical/not.

Usage

homogenous(vec)

Arguments

vec

Vector to be compared

Value

TRUE if every element of a vector is identical; FALSE otherwise.

See Also

See also all any

Examples

Run this code
# NOT RUN {
homogenous(c(rep("A",10),"A"))
homogenous(c(rep("A",10),"B"))
# }

Run the code above in your browser using DataLab