Learn R Programming

LaplacesDemon (version 16.1.6)

is.constant: Logical Check of a Constant

Description

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

Usage

is.constant(x)

Value

The is.constant function returns a logical result, reporting

TRUE when a vector is a constant, or FALSE otherwise.

Arguments

x

This is a vector.

Author

Statisticat, LLC. software@bayesian-inference.com

Details

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

See Also

Examples

Run this code
library(LaplacesDemon)
is.constant(rep(1,10)) #TRUE
is.constant(1:10) #FALSE

Run the code above in your browser using DataLab