From p.dalgaard at biostat.ku.dk  Mon May  8 15:43:57 2006
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: 08 May 2006 15:43:57 +0200
Subject: [Rd] mean of complex vector (PR#8842)
In-Reply-To: <20060508125557.67B80CCDA@slim.kubism.ku.dk>
References: <20060508125557.67B80CCDA@slim.kubism.ku.dk>
Message-ID: <x2fyjkein6.fsf@viggo.kubism.ku.dk>

john.peters at nmi.gov.au writes:

> Full_Name: John Peters
> Version: 2.3.0
> OS: Windows 2000, xp
> Submission from: (NULL) (220.233.20.203)
> 
> 
> In R2.3.0 on Windows 2000 and xp
> 
> > mean(c(1i))
> [1] 0+2i
> > mean(c(1i,1i))
> [1] 0+3i
> > mean(c(1i,1i,1i))
> [1] 0+4i
> 
> OK in R2.2.1

Yes. This comes from a blunder in summary.c, apparently attempting to
copy the code from the REALSXP case, mutatis mutandis, but not quite so...

-- 
   O__  ---- Peter Dalgaard             ?ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



[Rd] mean of complex vector (PR#8842)
Peter Dalgaard