Gri: RPN column manipulation

Chapters: 1: Introduction 2: Simple example 3: Invocation 4: Finer Control 5: X-Y Plots 6: Contour Plots 7: Image Plots 8: Examples 9: Gri Commands 10: Programming 11: Environment 12: Emacs Mode 13: History 14: Installation 15: Gri Bugs 16: Test Suite 17: Gri in Press 18: Acknowledgments 19: License Indices: Concepts Commands Variables | ### 10.9.7: Manipulation of Columns etc #### 10.9.7.1: Columns Individual data in the ``x`', ``y`', ``z`', ``u`', ``v`' and ``weight`' columns can be accessed with the ``@`' operator. The first point has index 0. Examples:
    show "first x is " {rpn x 0 @ }
    show "last  x is " {rpn x ..num_col_data.. 1 - @ }
    show "and here are all the data:"
    .i. = 0
    while {rpn .i. ..num_col_data.. >}
        show {rpn x .i. @ }
        .i. += 1
    end while
The mean value is available from the ``mean`' operator (e.g., ``.xmean. = {rpn x mean }`', while the standard deviation is given by ``stddev`', the skewness is given by ``skewness`', and the kurtosis is given by ``kurtosis`' (using the definition that yields 3 for a gaussian distribution). The minimal and maximal values are given by ``min`' and ``max`'. The area under the curve y=y(x) is found by ``{rpn y x area }`', defined by ``0.5 * sum ( (y[i] + y[i-1]) * (x[i] - x[i-1]) )`' for ``i`' ranging from 1 to ``..num_col_data..`'-1. #### 10.9.7.2: Grid Grid data can be accessed with e.g. ``{rpn grid min }` ', ``{rpn grid max }` ', and ``{rpn grid mean }` '. The value of the grid at a given ``(.x.,.y.)`' coordinate may be found by by e.g. ``{rpn grid .x. .y. interpolate}`'. The interpolation scheme is the same as that used in converting grids to images.