Hi Users, I want to fit the maximums of a data series with a cubic spline. How do I go about this in R. I failed to figure out how I can use the mgcv library to do this. Thanks ---------------------------- ZABLONE
Fitting Maximums of data series with cubic spline
2 messages · Zablone Owiti, Paul Hiemstra
On 10/27/2011 10:46 AM, Zablone Owiti wrote:
Hi Users, I want to fit the maximums of a data series with a cubic spline. How do I go about this in R. I failed to figure out how I can use the mgcv library to do this. Thanks ---------------------------- ZABLONE
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Hi Zablone, As a first remark, to get meaningful responses: PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. For calculating the maximum, use the max() function. For fitting splines take a look at the splines package. good luck, Paul
Paul Hiemstra, Ph.D. Global Climate Division Royal Netherlands Meteorological Institute (KNMI) Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39 P.O. Box 201 | 3730 AE | De Bilt tel: +31 30 2206 494 http://intamap.geo.uu.nl/~paul http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770