neville#

swordfish.function.neville()#

Resample X based on the specified resampleRule, closed and origin. Perform neville interpolation on Y based on the resampled X.

If outputX is unspecified, return a vector of Y after the interpolation.

If outputX=true, return a tuple where the first element is the vector of resampled X and the second element is a vector of Y after the interpolation.

Parameters:
  • X (Constant) – A strictly increasing vector of temporal type.

  • Y (Constant) – A numeric vector of the same length as X.

  • resampleRule (Constant) – A string. See the parameter rule of function resample for the optional values.

  • closed (Constant, optional) –

    A string indicating which boundary of the interval is closed.

    • The default value is ‘left’ for all values of rule except for ‘M’, ‘A’, ‘Q’, ‘BM’, ‘BA’, ‘BQ’, and ‘W’ which all have a default of ‘right’.

    • The default is ‘right’ if origin is ‘end’ or ‘end_day’.

  • origin (Constant, optional) –

    A string indicating which boundary is used to label the interval.

    • The default value is ‘left’ for all values of rule except for ‘M’, ‘A’, ‘Q’, ‘BM’, ‘BA’, ‘BQ’, and ‘W’ which all have a default of ‘right’.

    • The default is ‘right’ if origin is ‘end’ or ‘end_day’.

  • outputX (Constant, optional) – A Boolean value indicating whether to output the resampled X. The default value is false.