Bug 14201 - str() and signs in imaginary parts
str() and signs in imaginary parts
Status: CLOSED FIXED
Product: R
Classification: Unclassified
Component: I/O
old
All Mac OS X v10.5
: P5 normal
Assigned To: Jitterbug compatibility account
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-02 01:38 UTC by Jitterbug compatibility account
Modified: 2010-02-02 01:38 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jitterbug compatibility account 2010-02-02 01:38:50 UTC
From: Christian Hoffmann <c-w.hoffmann@sunrise.ch>
My unix mailer might not work, so I send the report here:

The function "str" perpetuates the sign of the imaginary part of the 
first array element which it should not:


 > str(c(1+2i,1-3i)); str(c(2-4i,11+3i));
 cplx [1:2] 1+2i 1+3i    # note the faulty 1 + 3i
 cplx [1:2] 2-4i  1-3i    # note the faulty 1 - 3i
 > bug.report()
Have a look at

 >  (xx <- complex(real=rnorm(5,0,1),imag=rnorm(5,0,1)))
[1] -0.686846-0.010655i  1.017494-0.644474i  0.212905-0.720527i
[4] -0.843110+1.538344i -1.341294-0.741398i
 > str(xx,vec.len  = 6)
 cplx [1:5] -0.687-0.011i 1.017-0.644i 0.213-0.721i -0.843-1.538i ...
 >

--please do not edit the information below--

Version:
 platform = x86_64-apple-darwin9.8.0
 arch = x86_64
 os = darwin9.8.0
 system = x86_64, darwin9.8.0
 status =
 major = 2
 minor = 10.1
 year = 2009
 month = 12
 day = 14
 svn rev = 50720
 language = R
 version.string = R version 2.10.1 (2009-12-14)

Locale:
C

Search Path:
 .GlobalEnv, package:tools, package:tcltk, package:survival, 
package:stats4, package:splines, package:spatial, package:rpart, 
package:nnet, package:nlme, package:mgcv, package:grid, package:foreign, 
package:datasets, package:codetools, package:cluster, package:class, 
package:boot, package:Matrix, package:MASS, package:graphics, 
package:grDevices, package:KernSmooth, package:stats, package:cwhmisc, 
package:lattice, package:utils, package:methods, Autoloads, package:base

-- 
Christian W. Hoffmann,
Rigiblickstrasse 15 b, CH-8915Hausen am Albis, Switzerland,
Tel +41-44-7640853, c-w.hoffmann@sunrise.ch
www.wsl.ch/personal_homepages/hoffmann/

Comment 1 Jitterbug compatibility account 2010-02-04 00:31:00 UTC
NOTES:
 bug is in prettyNum(drop0trailing = TRUE)
fixed in 2.10.1 patched
Comment 2 Jitterbug compatibility account 2010-02-04 00:31:02 UTC
Audit (from Jitterbug):
Wed Feb  3 18:31:02 2010	ripley	changed notes
Wed Feb  3 18:31:02 2010	ripley	moved from incoming to In-Out-fixed