powered by
splineDesign
cSplineDes(x, knots, ord = 4)
length(x)
length(knots)-1
cyclic.p.spline
x <- 0:100/100;k<- 0:5/5 X <- cSplineDes(x,k) plot(x,X[,1],type="l"); for (i in 2:5) lines(x,X[,i],col=i)
Run the code above in your browser using DataLab