functions on RObjects representing complex numbers -- functions on R objects representing complex numbers
The methods conjugate, imaginaryPart, and realPart are overloaded to call R's Conj, Im, and Re functions to return the complex conjugate, imaginary part, and real part respectively, of a given RObject representing a complex number
i1 : z = RObject(3 + 2*ii)
o1 = [1] 3+2i
o1 : RObject of type complex
i2 : conjugate z
o2 = [1] 3-2i
o2 : RObject of type complex
i3 : realPart z
o3 = [1] 3
o3 : RObject of type double
i4 : imaginaryPart z
o4 = [1] 2
o4 : RObject of type double