sample-methods            package:memisc            R Documentation

_T_a_k_e _a _S_a_m_p_l_e _f_r_o_m _a _D_a_t_a _F_r_a_m_e-_l_i_k_e _O_b_j_e_c_t

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

     The methods below are convenience short-cuts to take samples from
     data frames and data sets. They result in a data frame or data
     set, respectively, the rows of which are a sample of the complete
     data frame/data set.

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

     ## S3 method for class 'data.frame':
     sample(x, size, replace = FALSE, prob = NULL, ...)
     ## S3 method for class 'data.set':
     sample(x, size, replace = FALSE, prob = NULL, ...)

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

       x: a data frame or data set.

    size: an (optional) numerical value, the sample size, defaults to
          the total number of rows of 'x'.

 replace: a logical value, determines whether sampling takes place with
          or without replacement.

    prob: a vector of sampling probabities or NULL.

     ...: further arguments, ignored.

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

     A data frame or data set.

