svycoplot               package:survey               R Documentation

_C_o_n_d_i_t_i_o_n_i_n_g _p_l_o_t_s _o_f _s_u_r_v_e_y _d_a_t_a

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

     Draws conditioned scatterplots ('Trellis' plots) of survey data
     using hexagonal binning or transparency.

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

     svycoplot(formula, design, style = c("hexbin", "transparent"), basecol =
     "black", alpha = c(0, 0.8),hexscale=c("relative","absolute"), ...)

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

 formula: A graph formula suitable for 'xyplot'

  design: A survey design object 

   style: Hexagonal binning or transparent color?

 basecol: The fully opaque 'base' color for creating transparent
          colors. This may also be a function; see 'svyplot' for
          details

   alpha: Minimum and maximum opacity 

hexscale: Scale hexagons separate for each panel (relative) or across
          all panels (absolute)

     ...: Other arguments passed to 'grid.hexagons' or 'xyplot' 

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

     An object of class 'trellis'

_N_o_t_e:

     As with all 'Trellis' graphs, this function creates an object but
     does not draw the graph. When used inside a function or
     non-interactively you need to 'print()' the result to create the
     graph.

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

     'svyplot'

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

     data(api)
     dclus2<-svydesign(id=~dnum+snum,  weights=~pw,
                         data=apiclus2, fpc=~fpc1+fpc2)

     svycoplot(api00~api99|sch.wide*comp.imp, design=dclus2, style="hexbin")
     svycoplot(api00~api99|sch.wide*comp.imp, design=dclus2, style="hexbin", hexscale="absolute")

     svycoplot(api00~api99|sch.wide, design=dclus2, style="trans")

     svycoplot(api00~meals|stype,design=dclus2,
       style="transparent",
       basecol=function(d) c("darkred","purple","forestgreen")[as.numeric(d$stype)],
       alpha=c(0,1)) 

