Learn R Programming

discretes (version 0.1.0)

as.double.discretes: Convert a numeric series to a numeric vector

Description

Return all discrete values in the numeric series, if finite. Throws an error if infinite.

Usage

# S3 method for discretes
as.double(x, ...)

Value

A numeric vector containing all discrete values in x, ordered from smallest to largest. Returns numeric(0) when the interval contains no discrete values. Numeric outputs are wrapped in as.numeric().

Arguments

x

Numeric series (numeric vector or object of class "discretes").

...

Arguments to pass downstream to as.numeric() that's called on the resulting vector of discrete values.

See Also

get_discretes_in()

Examples

Run this code
as.numeric(integers(-3.5, 10))

Run the code above in your browser using DataLab