Re: [Rd] transpose of complex matrices in R

From: Olaf Mersmann <>
Date: Fri, 30 Jul 2010 12:01:22 +0200


On 30.07.2010, at 11:35, Robin Hankin wrote:
> 3. Try to define a t.complex() function:
> t.complex <- function(x){t(Conj(x))}
> (also fails because of recursion)

Try this version:

  t.complex <- function(x) {
    xx <- Conj(x)

You get infinite recursion in your example because you keep dispatching on the (complex) result of Conj(x) in t(Conj(x)). I'm not sure if the use of .Internal in user code is sanctioned but it does work for me.

Olaf mailing list Received on Fri 30 Jul 2010 - 19:27:01 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 01 Aug 2010 - 04:30:21 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive