Learn R Programming

discretes (version 0.1.0)

as_discretes: Convert to a discretes object

Description

Convert a foreign object to a "discretes" object.

Usage

as_discretes(x)

# S3 method for discretes as_discretes(x)

# S3 method for numeric as_discretes(x)

Value

A numeric series (object of class "discretes"). When x is a numeric vector, the series contains all unique values of x.

Arguments

x

Object to convert to object of class "discretes".

Methods (by class)

  • as_discretes(discretes): Convert a numeric vector to discretes object.

  • as_discretes(numeric): Keeps the discretes object as-is.

Examples

Run this code
as_discretes(0:10)

Run the code above in your browser using DataLab