

   CCaallccuullaattee ssuummmmaarryy ssttaattiissttiiccss

        stats(x, by)

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

          x: The data structure to compute the statistics. This
             can either be a vector, matrix (data sets are the
             columns), or a list (data sets are the compo-
             nents).

         by: If x is a vector, an optional vector specifying
             the categories to divide x into separate data
             sets.

   DDeessccrriippttiioonn::

        Stats breaks x up into separate data sets and then
        calls describe to calculate the statistics. The default
        set of statistics are the number of (nonmissing) obser-
        vations, mean, standard deviation, minimum, lower quar-
        tile, median, upper quartile, maximum, and number of
        missing observations.  If any data set is nonnumeric,
        missing values are returned for the statistics.  The by
        argument is a useful way to calculate statistics on
        parts of a data set according to different cases.

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

        A matrix where rows index the summary statistics and
        the columns index the separate data sets.

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

        describe

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

        Statistics for a normal random sample of 200 observations:

        rnorm(200) -> zork
        stats(zork) -> look
        look

        Summary statistics for the components of the climate data:

        stats(climate) -> look
        look

        Just list the means of the climate variables (second row of look):

        look[2,]

        Statistics for the actuator thrust by pressure level (there are 10 different
        pressure levels).

        stats(actuator.calibrate$force,by=actuator.calibrate$pressure)

