Learn R Programming

IntervalQuestionStat (version 0.2.0)

c: Combine IntervalData and IntervalList objects

Description

This function allows to combine single intervals and lists of intervals, that is, IntervalData and IntervalList objects, and then store the attained result as an IntervalList instance.

Usage

# S4 method for IntervalDataOrIntervalList
c(x, ...)

Value

This function returns the list of intervals obtained after the combination of the given interval-valued elements saved as anIntervalList object.

Arguments

x

A single nonempty compact real interval or a unique list of of this family stored as an IntervalData object or an IntervalList instance, respectively.

...

Additional single nonempty compact real intervals or lists of intervals of this family stored as IntervalData or IntervalList instances, respectively.

Author

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

Examples

Run this code
## Combine 'IntervalData' objects
i1 <- IntervalData(0, 1)
i2 <- IntervalData(0, 2)
list1 <- c(i1, i2)
list1

## Combine 'IntervalList' objects
list2 <- c(list1, list1)
list2

## Combine both 'IntervalData' and 'IntervalList' objects
list3 <- c(i1, list1)
list3
list4 <- c(list1, i1)
list4

Run the code above in your browser using DataLab