[R] Sweave and complex numbers

From: Robin Hankin <r.hankin_at_noc.soton.ac.uk>
Date: Mon 11 Jul 2005 - 21:25:49 EST


When using Sweave, most of my functions get called with complex arguments.

They get typeset in with additions that I don't want; "1+1i" appears as "1 + (0 + 1i)"
and I would rather have plain old "1+1i".

Example follows:


\title{A Test File}
\author{Robin Hankin}




A simple example:
f <- function(x){

Question: why does \verb=c(1,1+1i)= get printed as
\verb=c(1,1 + (0+1i))= ?

And how can I stop it?


can anyone help me here?

Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743

R-help@stat.math.ethz.ch mailing list
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Mon Jul 11 21:34:37 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:28 EST