Re: [R] Help with error on function: Error in .... attempt to apply non-function (Solution)

2009-09-15 Thread Corrado
Dear friends, the problem with the error has been solved (thanks to Peter). The line 41 in http://scsys.co.uk:8002/33852 should be rewritten as M<-k*((x-t[i])*m0+(t[i+k]-x)*m1)/((k-1)*(t[i+k]-t[i])) On Tuesday 15 September 2009 11:32:53 Corrado wrote: -- Corrado Topi Global Climate Change & B

Re: [R] Help with error on function: Error in .... attempt to apply non-function

2009-09-15 Thread Duncan Murdoch
On 15/09/2009 6:32 AM, Corrado wrote: Dear Duncan, this is a reproducible example: it is the function copied straight from my Eclipse. - You posted it in a way that couldn't be cut and pasted into R: you added line numbers. (A similar problem is when people use print() to show a dataset;

Re: [R] Help with error on function: Error in .... attempt to apply non-function

2009-09-15 Thread Corrado
Dear Duncan, this is a reproducible example: it is the function copied straight from my Eclipse. I found the mistake (thanks to Peter) On Tuesday 15 September 2009 11:15:29 Duncan Murdoch wrote: > Corrado wrote: > > Dear R gurrus, > > > > I wrote this function > > > > http://scsys.co.uk:80

Re: [R] Help with error on function: Error in .... attempt to apply non-function

2009-09-15 Thread Duncan Murdoch
Corrado wrote: Dear R gurrus, I wrote this function http://scsys.co.uk:8002/33852?ln=on&store=on&submit=Format+it! for a small package I am preparing. Whenever I run the function I get the error Error in Mspline(i = i, x = x, degree = kk, t = t) : attempt to apply non- function Anyone co

[R] Help with error on function: Error in .... attempt to apply non-function

2009-09-15 Thread Corrado
Dear R gurrus, I wrote this function http://scsys.co.uk:8002/33852?ln=on&store=on&submit=Format+it! for a small package I am preparing. Whenever I run the function I get the error Error in Mspline(i = i, x = x, degree = kk, t = t) : attempt to apply non- function Anyone could point me out w