[R] Max sig figs as well as Min in print?

2003-06-06 Thread Ted Harding
Hi Folks, Consider the following example (artificial, but it illustates the point): r2-sqrt(2) x-2-r2*r2 print(c(pi,sqrt(pi)),digits=5) [1] 3.1416 1.7725 print(c(pi,sqrt(pi),x),digits=5) [1] 3.1416e+00 1.7725e+00 -4.4409e-16 whereas I would prefer [1] 3.1416 1.7725

Re: [R] Max sig figs as well as Min in print?

2003-06-06 Thread Prof Brian Ripley
On Thu, 5 Jun 2003 [EMAIL PROTECTED] wrote: Hi Folks, Consider the following example (artificial, but it illustates the point): r2-sqrt(2) x-2-r2*r2 print(c(pi,sqrt(pi)),digits=5) [1] 3.1416 1.7725 print(c(pi,sqrt(pi),x),digits=5) [1] 3.1416e+00 1.7725e+00