stats                package:funfits                R Documentation

_C_a_l_c_u_l_a_t_e _s_u_m_m_a_r_y _s_t_a_t_i_s_t_i_c_s

_D_e_s_c_r_i_p_t_i_o_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) observations, mean, standard deviation,
     minimum, lower quartile, 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.

_U_s_a_g_e:

     stats(x, by)

_A_r_g_u_m_e_n_t_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 components). 

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

_V_a_l_u_e:

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

_S_e_e _A_l_s_o:

     describe

_E_x_a_m_p_l_e_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)

