drtsscount               package:mefa               R Documentation

_M_a_k_e_s _O_b_j_e_c_t _o_f _C_l_a_s_s '_s_s_c_o_u_n_t' _f_r_o_m _T_a_b_l_e _w_i_t_h _D_u_p_l_i_c_a_t_e _R_o_w_s

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

     The function makes an object ofclass 'sscount' from a table (data
     frame), when some samples are presented in more than one rows
     (identifiers are not unique).

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

     drtsscount(table, sample, segment = "unspecified")

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

   table: a data frame with count data.

  sample: a vector with same langth as number of rows in 'table'. Used
          as factor for coding samples.

 segment: arbitrary name of the segment (eg. adult, juvenile, male,
          female), included in the table,  by default it is
          '"unspecified"'.

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

     A result is an object of class 'sscount'. 

    data: data frame with columns 'sample', 'species', 'segment',
          'count'.

      zc: flag for rows with 0 total count, 'zc="zero.count"'.

nsamples: number of samples in 'table'.

nspecies: number of species in 'table'.

segment.levels: value of the 'segment' argument.

_N_o_t_e:

     In 'table', columns must refer to species, unlike in 'ttsscount',
     where species can be rows either by using the 'species.columns =
     False' argument. If this is the case, transpose the data frame as
     in the example below. Samples(rows) with 0 total count are flagged
     as 'zero.count' in the resulting 'sscount' object.

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

     Peter Solymos, Solymos.Peter@aotk.szie.hu, <URL:
     http://www.univet.hu/users/psolymos/personal/>

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

     'sscount', 'ttsscount'

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

     ## Not run: 
     data(vsample, vtable)

     v1 <- drtsscount(t(vtable), vsample$site.descr)
     v1

     v2 <- drtsscount(t(vtable), vsample$site.descr, segment = "adult")
     v2
     ## End(Not run)

