Learn R Programming

discretes (version 0.1.0)

Math.discretes: Math group generic for numeric series

Description

Support for exp, log, log10, log2, and sqrt on numeric series. The new series behaves as though the function is applied to each discrete value in the series.

Usage

# S3 method for discretes
Math(x, ...)

Value

A numeric series with the math function applied.

Arguments

x

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

...

Passed to log() for the base argument when op == "log".

Examples

Run this code
exp(integers(from = 0, to = 3))
log(natural1())
sqrt(integers(from = 0, to = 10))

Run the code above in your browser using DataLab