boxplot.stats              package:base              R Documentation

_B_o_x _P_l_o_t _S_t_a_t_i_s_t_i_c_s

_D_e_s_c_r_i_p_t_i_o_n:

     This function is typically is called by `boxplot' to gather the
     statistics necessary for producing box plots, but may be invoked
     separately.

_U_s_a_g_e:

     boxplot.stats(x, coef = 1.5, do.conf=TRUE, do.out=TRUE)

_A_r_g_u_m_e_n_t_s:

       x: a numeric vector for which the boxplot will be constructed
          (`NA's and `NaN's are allowed and omitted).

    coef: this determines how far the plot ``whiskers'' extend out from
          the box.  If `coef' is positive, the whiskers extend to the
          most extreme data point which is no more than `coef' times
          the interquartile coef from the box.  A value of zero causes
          the whiskers to extend to the data extremes.

do.conf,do.out: logicals; if `FALSE', the `conf' or `out' component
          respectively will be empty in the result.

_V_a_l_u_e:

     List with named components as follows: 

   stats: a vector of length 5, containing the extreme of the lower
          whisker, the lower ``hinge'', the median, the upper ``hinge''
          and the extreme of the upper whisker.

       n: the number of of non-`NA' observations in the sample.

    conf: the lower and upper extremes of the ``notch''.

     out: the values of any data points which lie beyond the extremes
          of the whiskers.


     Note that `$stats' and `$conf' are sorted in increasing order,
     unlike S, and that `$n' and `$out' include any `+- Inf' values.

_S_e_e _A_l_s_o:

     `fivenum', `boxplot', `bxp'.

_E_x_a_m_p_l_e_s:

     x <- c(1:100, 1000)
     str(boxplot.stats(x))
     str(boxplot.stats(x, do.conf=FALSE, do.out=FALSE))
     str(boxplot.stats(x, coef = 3, do.conf=FALSE))
     str(boxplot.stats(x, coef = 0))

     str(boxplot.stats(c(x, NA)))
     str(boxplot.stats(c(x, -1:1/0)))

