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

    Interface ApproxOptions

    Options for approx.

    interface ApproxOptions {
        f?: number;
        method?: "constant" | "linear";
        n?: number;
        rule?: number | readonly [number, number];
        ties?: Ties;
        xout?: Sample;
        yleft?: number;
        yright?: number;
    }
    Index
    f?: number

    For "constant": the step value is (1 - f) y_left + f y_right, with f in [0, 1] (else an error, as in R). Default 0.

    method?: "constant" | "linear"

    "linear" (default) or "constant" (step function). A unique prefix is accepted and anything else is an error, as in R.

    n?: number

    Number of points when xout is not given. Default 50.

    rule?: number | readonly [number, number]

    Extrapolation rule (1: NaN, 2: the end value), for both sides or [left, right]. Default 1. Any other value is an error (R takes every value other than 1 as 2).

    ties?: Ties

    How to merge equal x values. Default "mean".

    xout?: Sample

    Points to interpolate at. Default: n equally spaced points over the range of x.

    yleft?: number

    Value left of the data. Default: NaN (rule 1) or the first y (rule 2).

    yright?: number

    Value right of the data. Default: NaN (rule 1) or the last y (rule 2).