interval {reservr} | R Documentation |
Intervals
Description
Intervals
Usage
interval(
range = c(-Inf, Inf),
...,
include_lowest = closed,
include_highest = closed,
closed = FALSE,
integer = FALSE,
read_only = FALSE
)
is.Interval(x)
Arguments
range |
The interval boundaries as a sorted two-element numeric vector. |
... |
First argument is used as the endpoint if |
include_lowest |
Is the lower boundary part of the interval? |
include_highest |
Is the upper boundary part of the interval? |
closed |
Is the interval closed? |
integer |
Is the interval only over the integers? |
read_only |
Make the interval object read-only? |
x |
An object. |
Value
interval
returns an Interval
.
is.Interval
returns TRUE
if x
is an Interval
, FALSE
otherwise.
See Also
interval-operations
Examples
# The real line
interval()
# Closed unit interval
interval(c(0, 1), closed = TRUE)
# Alternative form
interval(0, 1, closed = TRUE)
# Non-negative real line
interval(c(0, Inf), include_lowest = TRUE)
[Package reservr version 0.0.3 Index]