[R] exponent confusion

2006-02-22 Thread tom wright
please excuse me if this ones a basic error y-c(-0.7,-0.6,-0.5) -0.7^1.22 [1] -0.6471718 y^1.22 [1] NaN NaN NaN am I missing something important in my basic math? __ R-help@stat.math.ethz.ch mailing list

Re: [R] exponent confusion

2006-02-22 Thread Prof Brian Ripley
On Wed, 22 Feb 2006, tom wright wrote: please excuse me if this ones a basic error y-c(-0.7,-0.6,-0.5) -0.7^1.22 [1] -0.6471718 ?Syntax shows ^ has a higher precedance than -, so that is -(0.7^1.22) y^1.22 [1] NaN NaN NaN am I missing something important in my basic math?

Re: [R] exponent confusion

2006-02-22 Thread Ted Harding
On 22-Feb-06 tom wright wrote: please excuse me if this ones a basic error y-c(-0.7,-0.6,-0.5) -0.7^1.22 [1] -0.6471718 y^1.22 [1] NaN NaN NaN am I missing something important in my basic math? Ummm, not sure ... it depends where the explanation fits in. It's certainly important, but

Re: [R] exponent confusion

2006-02-22 Thread Thomas Lumley
On Wed, 22 Feb 2006, tom wright wrote: please excuse me if this ones a basic error y-c(-0.7,-0.6,-0.5) -0.7^1.22 [1] -0.6471718 y^1.22 [1] NaN NaN NaN am I missing something important in my basic math? Yes. Non-integer powers of negative numbers don't work (well, they are complex

Re: [R] exponent confusion

2006-02-22 Thread Phineas Campbell
Subject: [R] exponent confusion please excuse me if this ones a basic error y-c(-0.7,-0.6,-0.5) -0.7^1.22 [1] -0.6471718 y^1.22 [1] NaN NaN NaN am I missing something important in my basic math? __ R-help@stat.math.ethz.ch mailing list https