Builds regression trees and random forests for longitudinal or functional data using a spline projection method. Implements and extends the work of Yu and Lambert (1999) <doi:10.1080/10618600.1999.10474847>. This method allows trees and forests to be built while considering either level and shape or only shape of response trajectories.

Splines are efficiently represented through their Taylor expansion at the knots. The representation accounts for the support sets and is thus suitable for sparse functional data. Two cases of boundary conditions are considered: zero-boundary or periodic-boundary for all derivatives except the last. The periodical splines are represented graphically using polar coordinates. The B-splines and orthogonal bases of splines that reside on small total support are implemented. The orthogonal bases are referred to as 'splinets' and are utilized for functional data analysis. Random spline generator is implemented as well as  all fundamental algebraic and calculus operations on splines.  The optimal, in the least square sense, functional fit by 'splinets' to data consisting of sampled values of functions as well as splines build over another set of knots is obtained and used for functional data analysis.  <arXiv:2102.00733>, <doi:10.1016/j.cam.2022.114444>,  <arXiv:2302.07552>.

Procedure to optimally split a dataset for training and testing. 
    'SPlit' is based on the method of support points, which is independent of modeling methods.
    Please see Joseph and Vakayil (2021) <doi:10.1080/00401706.2021.1921037> for details.
    This work is supported by U.S. National Science Foundation grant DMREF-1921873.

Some R functions, such as optim(), require a function
  its gradient passed as separate arguments. When these are
  expensive to calculate it may be much faster to calculate
  the function (fn) and gradient (gr) together since they often share
  many calculations (chain rule). This package allows the user
  to pass in a single function that returns both the function
  and gradient, then splits (hence 'splitfngr') them
  so the results can be accessed
  separately. The functions provided allow this to be done with
  any number of functions/values, not just for functions and gradients.