dispersion              package:plotrix              R Documentation

_D_i_s_p_l_a_y _a _m_e_a_s_u_r_e _o_f _d_i_s_p_e_r_s_i_o_n

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

     Display line/cap bars at specified points on a plot representing
     measures of dispersion.

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

      dispersion(x,y,ulim,llim=ulim,intervals=TRUE,arrow.cap=0.01,arrow.gap=NA,
       type="a",fill=NA,...)
      dispbars(x,y,ulim,llim=ulim,intervals=TRUE,arrow.cap=0.01,arrow.gap=NA,...)

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

     x,y: x and y position of the centers of the bars

ulim,llim: The extent of the dispersion measures.

arrow.cap: The width of the cap at the outer end of each bar as a
          proportion of the width of the plot.

arrow.gap: The gap to leave at the inner end of each bar. Defaults to
          two thirds of the height of a capital "O".

intervals: Whether the limits are intervals (TRUE) or absolute values
          (FALSE).

    type: What type of display to use.

    fill: Color to fill between the lines if 'type' is not NULL and
          'fill' is not NA.

     ...: additional arguments passed to 'arrows' or 'lines' depending
          upon 'type'.

_D_e_t_a_i_l_s:

     'dispersion' displays a measure of dispersion on an existing plot.
     Currently it will display either vertical lines with caps (error
     bars) or lines that form a "confidence band" around a line of
     central tendency. If 'fill' is not NA and 'type' is '"l"', a
     polygon will be drawn between the confidence lines. Remember that
     any points or lines within the confidence band will be obscured,
     so these will have to be redrawn.

     The 'intervals' argument allows the user to pass the limits as
     either intervals (the default) or absolute values.

     'dispbars' is now a call to 'dispersion' with 'type' set to 'a'.

     If 'arrow.gap' is greater than or equal to the upper or lower
     limit for a bar, 'segments' is used to draw the upper and lower
     caps with no bars to avoid zero length arrows.

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

     nil

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

     Jim Lemon

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

     'arrows', 'segments','lines'

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

      disptest<-matrix(rnorm(200),nrow=20)
      disptest.means<-rowMeans(disptest)
      row.order<-order(disptest.means)
      se.disptest<-unlist(apply(disptest,1,std.error))
      plot(disptest.means[row.order],main="Dispersion as error bars",
       ylim=c(min(disptest.means-se.disptest),max(disptest.means+se.disptest)),
       xlab="Occasion",ylab="Value")
      dispersion(1:20,disptest.means[row.order],se.disptest[row.order])
      plot(disptest.means[row.order],main="Dispersion as confidence band",
       ylim=c(min(disptest.means-se.disptest),max(disptest.means+se.disptest)),
       xlab="Occasion",ylab="Value")
      dispersion(1:20,disptest.means[row.order],se.disptest[row.order],type="l",
       fill="#eeccee",lty=2)
      # remember to redraw the points
      points(disptest.means[row.order])

