summary.complex | R Documentation |
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.
## S3 method for class 'complex'
summary(object, ..., digits)
object |
a complex vector or scalar. |
... |
additional arguments, not used. |
digits |
integer specifying the number of digits to include in the summary values. |
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.
set.seed(4242)
n <- 8
foo <- complex(real = rnorm(n), imaginary = rnorm(n))
summary(foo)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.