make.groups             package:lattice             R Documentation

_G_r_o_u_p_e_d _d_a_t_a _f_r_o_m _m_u_l_t_i_p_l_e _v_e_c_t_o_r_s

_D_e_s_c_r_i_p_t_i_o_n:

     Combines two or more vectors, possibly of different lengths,
     producing a data frame with a second column indicating which of
     these vectors that row came from.  This is mostly useful for
     getting data into a form suitable for use in high level Lattice
     functions.

_U_s_a_g_e:

     make.groups(...)

_A_r_g_u_m_e_n_t_s:

     ...: one or more vectors of the same type (coercion is attempted
          if not), or one or more data frames with similar columns,
          with possibly differing number of rows. 

_V_a_l_u_e:

     When all the input arguments are vectors, a data frame with two
     columns 

  'data': all the vectors supplied, concatenated 

 'which': factor indicating which vector the corresponding 'data' value
          came from 

     When all the input arguments are data frames, the result of
     'rbind' applied to them, along with an additional 'which' column
     as described above.

_A_u_t_h_o_r(_s):

     Deepayan Sarkar Deepayan.Sarkar@R-project.org

_S_e_e _A_l_s_o:

     'Lattice'

_E_x_a_m_p_l_e_s:

     sim.dat <-
         make.groups(uniform = runif(200),
                     exponential = rexp(175),
                     lognormal = rlnorm(150),
                     normal = rnorm(125))
     qqmath( ~ data | which, sim.dat, scales = list(y = "free"))

