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

View source: R/convert.R

as.interval.numericR Documentation

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 class 'numeric'
as.interval(x)

Arguments

x

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

Value

An interval object constructed from the numeric vector.

Examples

as.interval(1:6)

COveR documentation built on Oct. 30, 2024, 9:28 a.m.