Re: [R] About uniroot error

2018-09-25 Thread Tania Morgado Garcia
Thanks for your reply. You're right, return a vector. An example of the dataset: ts pu carbono 1 15 2.04 1 37 1.27 1 55 0.93 1 80 0.5 1 105 0.49 1 22 2.08 1 41 1.43 1 65 0.78 The data that originate the FCOS and FRCOS pattern functions are others, which I only use to obtain the functions. Thanks

Re: [R] About uniroot error

2018-09-25 Thread Michael Dewey
Dear Tania Without your dataset I am not sure but a comment below to suggest where to look next. On 24/09/2018 18:37, Tania Morgado Garcia wrote: Thanks for your answers. I continue to learn R and now I am detained in an error with uniroot that I see happens to others but I can not find the s

Re: [R] About uniroot error

2018-09-24 Thread J C Nash
uniroot REQUIRES that the function be of opposite sign at each end of the starting interval. I won't address the other issues raised, but you can use simple stepping from a starting argument until a sign change occurs. Or you could try a different type of rootfinder, such as newtonRaphson in packa

[R] About uniroot error

2018-09-24 Thread Tania Morgado Garcia
Thanks for your answers. I continue to learn R and now I am detained in an error with uniroot that I see happens to others but I can not find the solution. Next the code x1 <- BAaxOrd$V1 y1 <- BAaxOrd$V2 x1R <- BAaxOrdRCOS$V1 y1R <- BAaxOrdRCOS$V2 FCOS1 <- splinefun(smooth.spline(x1,y1)) FRCOS1 <-