[R] help on using sum in writng a function again

skim033 at student.ucr.edu skim033 at student.ucr.edu
Mon Apr 10 03:30:10 CEST 2006

Hi, thanks for your reply. 
Here I would like to ask you again more directly.
The following is what I had for now.
The function to begin with is 

Now, I wanted to sum it over k from -10000 to 10000. So, I 
wrote the following.

Next, I would like sum over j as
(This is a way I thouhgt about computing a double sum)
expecting f2 be a function of theta. 

Then, I wanted to plot f2 for theta from 0 to 2*pi. But, f2
(seq(0,2*pi,length=10)) is a scalar, not a vector with the 
dimension of 10x1. I would like to ask you how I can use 
rowSums with outer or some other method to correct my coding.

I would like to thank you in advance.
UC riverside.

More information about the R-help mailing list