Re: [R] computing functions with Euler's number (e^n)

2011-07-14 Thread warmstron1
I solved this in two ways: 1. ** was necessary to raise (-dummy + 1) to the power of B. ^ doesn't work here, for some reason. 2. I needed to use as.complex which greatly simplified my code and produces the correct response. (I had to revisit math that I had not used in many years.) W -

Re: [R] computing functions with Euler's number (e^n)

2011-07-14 Thread Berend Hasselman
warmstron1 wrote: I solved this in two ways: 1. ** was necessary to raise (-dummy + 1) to the power of B. ^ doesn't work here, for some reason. ... Using which version R on which platform? Most strange. The help page for Arithmetic operators clearly states in a Note that ** is

Re: [R] computing functions with Euler's number (e^n)

2011-07-14 Thread warmstron1
R 2.11.1 on Mac OS X. I didn't see the Note. -- View this message in context: http://r.789695.n4.nabble.com/computing-functions-with-Euler-s-number-e-n-tp3655205p3668849.html Sent from the R help mailing list archive at Nabble.com. __

[R] computing functions with Euler's number (e^n)

2011-07-08 Thread William Armstrong
I am trying to create a set of wavelets in frequency space--namely Cauchy wavelets for an intensity analysis (von Tscharner, 2000). The wavelets are defined by the following formula: [(f/cf)^(cf*scale)]*[e^((-f/cf)+1)^(cf*scale)] where *f *is frequency of length *n*, *cf* is center frequency

Re: [R] computing functions with Euler's number (e^n)

2011-07-08 Thread Daniel Malter
The problem arises in the computation of U where (-dummy+1) turns negative (the eighth and higher index values of dummy). You raise a negative number to a non-integer power, for example, (-pi)^exp(1), which fails because you would not be able to tell, which sign the resulting number should have.