Re: [R] WIERD: Basic computing in R

2008-07-01 Thread Thomas Lumley
This is FAQ 7.33 -thomas On Tue, 1 Jul 2008, [EMAIL PROTECTED] wrote: Can someone please enlighten me as to why the following happens? -2.7^8.6 [1] -5125.407 p<- -2.7 q<- 8.6 p^q [1] NaN R seems perfectly able to calculate -2.7^8.6, but fails when the exact same values are assig

Re: [R] WIERD: Basic computing in R

2008-07-01 Thread Mark Lyman
poolloopus yahoo.com yahoo.com> writes: > > Can someone please enlighten me as to why the following happens? > > -2.7^8.6 > [1] -5125.407 > > > p<- -2.7 > > q<- 8.6 > > p^q > [1] NaN > R seems perfectly able to calculate -2.7^8.6, but fails when the exact same values are assigned to > variabl

Re: [R] WIERD: Basic computing in R

2008-07-01 Thread Marc Schwartz
on 07/01/2008 01:15 PM [EMAIL PROTECTED] wrote: Can someone please enlighten me as to why the following happens? -2.7^8.6 [1] -5125.407 p<- -2.7 q<- 8.6 p^q [1] NaN R seems perfectly able to calculate -2.7^8.6, but fails when the exact same values are assigned to variables and then the co

Re: [R] WIERD: Basic computing in R

2008-07-01 Thread Dirk Eddelbuettel
On Tue, Jul 01, 2008 at 11:15:58AM -0700, [EMAIL PROTECTED] wrote: > Can someone please enlighten me as to why the following happens? > > -2.7^8.6 > [1] -5125.407 > > > p<- -2.7 > > q<- 8.6 > > p^q > [1] NaN > R seems perfectly able to calculate -2.7^8.6, but fails when the exact same > values ar

[R] WIERD: Basic computing in R

2008-07-01 Thread [EMAIL PROTECTED]
Can someone please enlighten me as to why the following happens? > -2.7^8.6 [1] -5125.407 > p<- -2.7 > q<- 8.6 > p^q [1] NaN R seems perfectly able to calculate -2.7^8.6, but fails when the exact same values are assigned to variables and then the computation is repeated. Thanks in advance for an