Re: [R] Writing Complex Formulas

2011-07-15 Thread peter dalgaard
On Jul 14, 2011, at 20:19 , Duncan Murdoch wrote: On 14/07/2011 12:46 PM, warmstron1 wrote: I resolved this issue. It appears that ^ won't work for this case, but ** worked. I can't find any reference to this, but where ^ seems to be used to raise a value to a numerical function, ** is

Re: [R] Writing Complex Formulas

2011-07-15 Thread William Armstrong
Forgive me. I had a legitimate problem that I found resolvable using ** instead of ^. I can't seem to recreate the problem to obtain the error message that I was receiving. Incomplete information is perhaps more appropriate than *mis*information. Here is the exact code I used (still not

Re: [R] Writing Complex Formulas

2011-07-15 Thread Berend Hasselman
warmstron1 wrote: for(j in 1:J) + { + Z - dummy**B[j] + U - (-dummy+1)**B[j] + } Z I replaced ** with ^ and got the same results as you. But why are you doing a for loop here? At each iteration you are overwriting the previous results of Z and U and retaining only the values obtained

Re: [R] Writing Complex Formulas

2011-07-14 Thread warmstron1
I resolved this issue. It appears that ^ won't work for this case, but ** worked. I can't find any reference to this, but where ^ seems to be used to raise a value to a numerical function, ** is used for a y raised to the power of x where x it a computation. -- View this message in context:

Re: [R] Writing Complex Formulas

2011-07-14 Thread Duncan Murdoch
On 14/07/2011 12:46 PM, warmstron1 wrote: I resolved this issue. It appears that ^ won't work for this case, but ** worked. I can't find any reference to this, but where ^ seems to be used to raise a value to a numerical function, ** is used for a y raised to the power of x where x it a

[R] Writing Complex Formulas

2011-07-01 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