- #1
aymer
- 16
- 0
Hey everyone,
This is for someone who has used R. Please tell me how can we sum a function with a free parameter in R.
I used the normal command f=function(n) sum(body of function containing n)
it does not show any warnings till here, but when I plot this sum vs n (which i now define as a sequence, n=seq(-1.2,0.8)), it shows that the two quantities have differing lengths.
How can this be if my sum is a function of n?
Did I define the sum incorrectly?
Please help
This is for someone who has used R. Please tell me how can we sum a function with a free parameter in R.
I used the normal command f=function(n) sum(body of function containing n)
it does not show any warnings till here, but when I plot this sum vs n (which i now define as a sequence, n=seq(-1.2,0.8)), it shows that the two quantities have differing lengths.
How can this be if my sum is a function of n?
Did I define the sum incorrectly?
Please help