Perhaps:
r <- function(n, k, theta){
return(sqrt((sum(cos(k*theta))^2 + sum(sin(k*theta))^2)/n))
}
On 17/10/2007, Zack Darnell <[EMAIL PROTECTED]> wrote:
>
> I am relatively new to R, so this may be a much simpler question than it
> seems to me. I am trying to create a function that includes
Zack Darnell wrote:
> I am relatively new to R, so this may be a much simpler question than
> it seems to me. I am trying to create a function that includes two
> summations, and can't figure out how. I am attaching the equation as a
> pdf file. This function will then be optimized over a chosen
I am relatively new to R, so this may be a much simpler question than it
seems to me. I am trying to create a function that includes two
summations, and can't figure out how. I am attaching the equation as a
pdf file. This function will then be optimized over a chosen range of
values, but right
3 matches
Mail list logo