chadd                 package:chplot                 R Documentation

_A_d_d _e_l_e_m_e_n_t_s _t_o _a _c_h_p_l_o_t

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

     'chadd' is a function that adds any further elements to a plot
     produced with the function 'chplot'.

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

     chadd(param,pos,add.fun,...)

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

   param: the parameters specifying the plotting regions. As obtained
          from 'chplot'. 

     pos: the plotting region to which an element is to be added: '1'
          for the main plot, '2' for top left (marginal distribution
          plot of the x-variable), '3' for top right (the legend), '4'
          for bottom right (marginal distribution plot of the
          y-variable). 

 add.fun: the function to be applied.

     ...: optional parameters to 'add.fun', separated by commas.

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

     'chplot'.

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

     data(hdr)
     # hdr dataset
     param<-chplot(age~income|gender,data=hdr,log="x")
     # box around the legend region
     chadd(param,3,box,"figure")
     # tickmark for overall mean in marginal distribution plots
     chadd(param,2,lines,c(mean(hdr$income),mean(hdr$income)),c(0,.05))
     chadd(param,4,lines,c(0,.025),c(mean(hdr$age),mean(hdr$age)))

