

   SSwweeeepp oouutt AArrrraayy SSuummmmaarriieess

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

   AArrgguummeennttss::

          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'.

   VVaalluuee::

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

   SSeeee AAllssoo::

        `apply'.

   EExxaammpplleess::

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

