Skip to content

Fitting Maximums of data series with cubic spline

2 messages · Zablone Owiti, Paul Hiemstra

#
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
#
On 10/27/2011 10:46 AM, Zablone Owiti wrote:
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