Learn R Programming

complexlm (version 1.1.2)

range: Range For Complex Objects

Description

This function extends base::range to the field of complex numbers. It returns a vector containing two complex numbers that are the diagonal points of a rectangle, with sides parallel to the real and imaginary axes, that just contains all the complex numbers given as arguments. If given non complex input it calls base::range, please see the documentation for that function for an explanation of its behavior with other input.

Usage

range(..., na.rm = FALSE, finite = FALSE)

Value

A complex vector describing a rectangle that all input values fall within.

Arguments

...

Any complex, numeric, or character object

na.rm

logical, indicates if NA's should be removed.

finite

logical, indicates if non-finite elements should be omitted.

See Also

Examples

Run this code
set.seed(4242)
n <- 8
foo <- complex(real = rnorm(n), imaginary = rnorm(n))
range(foo)

Run the code above in your browser using DataLab