complex(n=0, real=numeric(), imag=numeric()) as.complex(z) is.complex(z) Re(z) Im(z) Mod(z) Arg(z) Conj(z)
complex.
The vector can be specified either by giving its length,
or its real and imaginary parts (or both).
Note that is.complex and is.numeric are never both TRUE.
The functions Re, Im, Mod, Arg and Conj
have their usual interpretation as returning the real part,
imaginary part, modulus, argument and complex conjugate for
complex values.
In addition, the elementary trigonometric, logarithmic and
exponential functions are available for complex values.