rStats.js v1.3.0
    Preparing search index...

    Function splinefunH

    • The cubic Hermite spline with values y and slopes m at the points x, as a function of x and the order of derivative (0 to 3; a fraction is truncated, as R does); linear outside the data. Equivalent to R's splinefunH(). Except for the third derivative: on [x_i, x_{i+1}] it is the exact (6 m_i + 6 m_{i+1} - 12 delta) / h^2, with h = x_{i+1} - x_i and delta = (y_{i+1} - y_i) / h, where R divides by h only once (the two agree when h = 1). The order of derivative is the second argument of the function or its option deriv (SplineFunction).

      Parameters

      Returns SplineFunction

      splinefunH([0, 2], [0, 0], [1, 1])([1], 3);           // [3] (R: 6)
      splinefunH([0, 2], [0, 0], [1, 1])([1], { deriv: 3 }); // [3]