Learn R Programming

complexlm (version 1.1.2)

summary.complex: summary method for complex objects

Description

The base summary method for complex objects only reports their length and that they are complex.. This improved method returns the length, as well as the mean, median, variance, and pseudo variance of the given complex object.

Usage

# S3 method for complex
summary(object, ..., digits)

Value

A list containing the length of the object, and a complex named vector containing in the median, mean, variance, and pseudo variance of the object; in that order.

Arguments

object

a complex vector or scalar.

...

additional arguments, not used.

digits

integer specifying the number of digits to include in the summary values.

Examples

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

Run the code above in your browser using DataLab