Learn R Programming

COveR (version 1.0.4)

as.interval.numeric: Converts a numeric vector to an interval object.

Description

The length of the numeric vector must be even, representing pairs of minimum and maximum values.

Usage

# S3 method for numeric
as.interval(x)

Value

An interval object constructed from the numeric vector.

Arguments

x

A numeric vector where each consecutive pair of values represents an interval.

Examples

Run this code
as.interval(1:6)

Run the code above in your browser using DataLab