home *** CD-ROM | disk | FTP | other *** search
-
- _D_i_v_i_d_e _i_n_t_o _G_r_o_u_p_s
-
- split(x, groups)
-
- _A_r_g_u_m_e_n_t_s:
-
- x : vector containing the values to be divided
- into groups.
-
- group : a factor which defines the grouping.
-
- _D_e_s_c_r_i_p_t_i_o_n:
-
- split divides the data in the vector x into the groups
- defined by the factor groups.
-
- The value returned is a list of vectors containing the
- values for the groups. The components of the list are
- named by the factor levels of group.
-
- _E_x_a_m_p_l_e_s:
-
- xa <- split(x, age)
- lapply(xa, mean)
- #split a matrix into a list by columns
- split(x,col(x))
-
-