title: Is there an R function for separating smoothed functional data?
body: <p>I have made two smoothed functional curves approximated by B-splines of order 8 and 349 equidistant knots from year 1971 to 2000. Now I would like to separate these functions into shorter intervals, e.g. every year and compute semi-metrics between those functions. Is there any function for this task in Rstudio?</p>
  
  <p>I have tried to change rangeval in fd object but in function 
  semimetric.basis(fd_1, fd_2, nderiv = 0) there is an error </p>
  
  <blockquote>
    <p>"Error in bsplineS(evalarg, breaks, norder, nderiv, returnMatrix):
    Knots are not increasing".</p>
  </blockquote>
  
  <pre><code>basis &lt;- create.bspline.basis(rangeval = c(1971, 2000),
                                nbasis = 355,
                                norder = 8) 
  Lfdobj_f &lt;- int2Lfd(4)
  Sm_f &lt;- smooth.basisPar(argvals = seq(from = 1971, to = 2000,length  = 349),              
                          y = cbind(func_1, func_2),
                          fdobj = basis,
                          Lfdobj = Lfdobj_f,
                          lambda = 1e-9)
  
  Sm_f[1, 0]$fd$basis$rangeval &lt;- c(1971, 1972)
  Sm_f[2, 0]$fd$basis$rangeval &lt;- c(1971, 1972)
  
  output &lt;- semimetric.basis(Sm_f[1, 0]$fd, Sm_f[2, 0]$fd, nderiv = 0)
  </code></pre>
  
  <p>I expected the output of real number.</p>