Martin Maechler
1997-Apr-08 08:43 UTC
R-alpha: Seg.faults with complex: factor(..), unique(..). Missing feature ``sort( complex(..) )''
1) Several functions still (0.50 - pre6) give seg.faults when called with complex: unique( 1i) --> segfault In 'factor', levels are defaulted to 'sort(unique(x))' which seg.faults factor( 1i). Because of 'factor', table(..complex..) seg.faults,..... 2) sort ( complex ) [[Of course this is minor ..]] You may not believe this can be useful, but... I've been digging in old S-code which makes use of this (and also of unique(.)) Be z = x + 1i*y; x,y real vectors Then, order(z) : <--> order(x,y) This is how it is defined in S (but it is implemented via .Internal(..)). One could add the following line to the definition of 'sort' if(is.complex(x)) return( x[order(Re(x),Im(x))] ) which has the drawback of NOT using the 'partial' and 'na.last' arguments. ((This actually makes me think that maybe 'order' should also accept these two)). =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Apparently Analagous Threads
- read.table problem on Linux/Alpha (seg faults caused by isspace(R_EOF)) (PR#303)
- RE: etc win32utils seg faults when a pdc/bdc is queried
- Seg. faults in mapthin
- [LLVMdev] hello. seg faults on AMD64 linux
- [DC2.x ]pop3-login seg faults when compiled with gcc 4.5.2 and gold