as.IntervalData {IntervalQuestionStat}R Documentation

Convert a real number into a degenerate interval

Description

This function allows to coerce a real number stored as a single numeric object to a degenerate interval formed only by this real number saved as an IntervalData instance.

Usage

## S4 method for signature 'numeric'
as.IntervalData(object)

Arguments

object

A single real number stored as a single numeric object.

Details

Single real numbers could be seen as particular cases of interval-valued data where each interval's lower and upper bounds are equal or, alternatively, its spread is zero.

Value

This function returns a degenerate interval saved as an object of class IntervalData.

Author(s)

José García-García garciagarjose@uniovi.es

See Also

Other coercion function is as.IntervalList().

Examples

## Transform a single real-valued number into an interval
## In particular, degenerate interval {1} is defined.
i <- as.IntervalData(1); i

[Package IntervalQuestionStat version 0.2.0 Index]