onion (version 1.5-3)

drop: Drop zero imaginary parts of an onionic vector

Description

If an onion has zero imaginary part, drop it

Usage

# S4 method for onion
drop(x)

Arguments

x

onion

Author

Robin K. S. Hankin

Details

Generally, “drop” means coercion of an object to a less general type without loss of information. In many contexts, function drop() means to lose redundant information. This is not done by default (doing so would result in unexpected coercions).

Methods are given for onion and onionmat objects.

Examples

Run this code
a <- rsoct()
a
a-Im(a)
drop(a-Im(a))

Run the code above in your browser using DataLab