is.constant: Logical Check of a Constant

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/is.constant.R

Description

This function provides a logical test of whether or not a vector is a constant.

Usage

1

Arguments

x

This is a vector.

Details

As opposed to a variable, a constant is a vector in which the elements contain less than or equal to one unique value.

Value

The is.constant function returns a logical result, reporting TRUE when a vector is a constant, or FALSE otherwise.

Author(s)

Statisticat, LLC. software@bayesian-inference.com

See Also

unique

Examples

1
2
3
library(LaplacesDemon)
is.constant(rep(1,10)) #TRUE
is.constant(1:10) #FALSE

LaplacesDemon documentation built on July 9, 2021, 5:07 p.m.