splitdata                package:CTFS                R Documentation

_R_e-_s_t_r_u_c_t_u_r_e_s _a _D_a_t_a_f_r_a_m_e _i_n_t_o _a _L_i_s_t _o_f _D_a_t_a_f_r_a_m_e_s _b_y _v_a_l_u_e_s _o_f _a _C_o_l_u_m_n 
_i_n _t_h_e _D_a_t_a_f_r_a_m_e

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

     THIS FUNCTION WILL BE DELETED IN FUTURE RELEASES AND REPLACED BY :
     'sep.data' and 'sep.vct.data'.  See  'CTFS.readwrite' and
     'CTFS.groupcats' for a  description of replacement functions.

     Creates a list from a dataframe with each dataframe being the rows
      from the orignial file that have the same value for the split 
     variable.  There are as many dataframes in the list as there are 
     valid values for the split variable.

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

     splitdata(census1, split = census1$sp, allsplit = unique(split))

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

 census1: any *"dataframe"*

   split: any column name in the *dataframe*

allsplit: a unique set of values of 'split'

_D_e_t_a_i_l_s:

     Different columns of the 'census1' can be defined by using the
     format: 'census1$columnname'.  In this case DO NOT USE QUOTES. Do
     not ever provide a different parameter value for 'allsplit'.  As
     seen from the usage, 'allsplit' is the result of a function, not a
     user defined parameter.  The values of the split are sorted
     alphabetically and missing values, including "."  are provided. 

      This function is very useful for turning any *dataframe* into a 
     *list* of the same records.  For instance, taking the *.full
     dataset  and creating the *.spp dataset. 

      The function sends a message to the terminal to indicate the 
     progress is it making on each value of the 'split' variable.

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

     Returns a *list* of dataframes with tree records from  one or more
     census1es

_A_u_t_h_o_r(_s):

     Rick Condit

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

     'CTFS.readwrite'

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

     ## Not run: 

     # make the bci95.spp from bci95.full
     tst.out.1 <- splitdata("tst.bci90.full")

     # note this file is identical to the results of sep.data
     tst.out.2 <- sep.data("tst.bci90.full")
     identical(tst.out.1, tst.out.2)

     # specifying a different column in the census
     tst.out.codes <- splitdata("tst.bci90.full",split=tst.bci90.full$codes)

     ## End(Not run)

