numSummary               package:Rcmdr               R Documentation

_M_e_a_n, _S_t_a_n_d_a_r_d _D_e_v_i_a_t_i_o_n, _a_n_d _Q_u_a_n_t_i_l_e_s _f_o_r _N_u_m_e_r_i_c _V_a_r_i_a_b_l_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     'numSummary' creates neatly formatted tables of means, standard
     deviations, and quantiles of numeric variables.

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

     numSummary(data, statistics=c("mean", "sd", "quantiles"), 
         quantiles=c(0, .25, .5, .75, 1), groups)
         
     ## S3 method for class 'numSummary':
     print(x, ...)

_A_r_g_u_m_e_n_t_s:

    data: a numeric vector, matrix, or data frame.

statistics: any of '"mean"', '"sd"', or '"quantiles"',  defaulting to
          all three.

quantiles: quantiles to report; default is 'c(0, 0.25, 0.5, 0.75, 1)'.

  groups: optional variable, typically a factor, to be used to
          partition the data.

       x: object of class '"numSummary"' to print.

     ...: arguments to pass down from the print method.

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

     'numSummary' returns an object of class '"numSummary"' containing
     the table of  statistics to be reported along with information on
     missing data, if there are any.

_A_u_t_h_o_r(_s):

     John Fox jfox@mcmaster.ca

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

     'mean', 'sd', 'quantile'.

_E_x_a_m_p_l_e_s:

     library(car)
     Prestige[1, "income"] <- NA
     numSummary(Prestige[,c("income", "education")])
     numSummary(Prestige[,c("income", "education")], groups=Prestige$type)
     remove(Prestige)

