

   SSwweeeepp oouutt AArrrraayy SSuummmmaarriieess

        sweep(x, MARGIN, STATS, FUN="-", ...)

   AArrgguummeennttss::

          x: an array.

     MARGIN: a giving the extents of `x' which correspond to
             `STATS'.

      STATS: the summary statistic which is to be swept out.

        FUN: the function to be used to carry out the sweep.
             In the case of binary operators such as `"/"'
             etc., the function name must be quoted.

        ...: optional arguments to `FUN'.

   VVaalluuee::

        An array with the same shape as `x', but with the sum-
        mary statistics swept out.

   SSeeee AAllssoo::

        `apply' on which `sweep' is based; `scale' for center-
        ing and scaling.

   EExxaammpplleess::

        data(attitude)
        med.att <- apply(attitude, 2, median)
        sweep(data.matrix(attitude), 2, med.att)# subtract the column medians

