Is there is function in R equivalent to Matlab's csaps? I need a spline function with the same calculation of the smoothing parameter in csaps to compare some results. AFAIK, the spar in smooth.spline is related but not the same.