sscount                 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'

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

     The function makes an object of class 'sscount' from a data frame
     with columns for samples, species, count and optionally segment.

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

     sscount(sstable, zc = "NULL")

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

 sstable: dataframe with three or four columns. Columns must be in the
          order of sample, species, segment (optional) and count.

      zc: identifier for samples with zero count, by default it is
          '"NULL"'. When non existing identifier is given, the value is
          set to default with warning.

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

     A result is an object of class 'sscount'. 

    data: data frame with columns 'sample', 'species', 'segment',
          'count'. First three columns are factors, 'count' is numeric.

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

nsamples: number of samples (levels) in data column 'sample'.

nspecies: number of species (levels) in data column 'species', 
          "pseudo-species" created by 'zc' is excluded.

segment.levels: list of levels in data column 'segment'.

_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:

     'drtsscount', 'fill.count', 'inflate', 'sscount', 'ttsscount'

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

     ### Example 1: simple atrificial data

     ss <- data.frame(
     cbind(
     c("sample1","sample1","sample2","sample2","sample3","sample4"),
     c("species1","species1","species1","species2","species3","zero.count"),
     c("male","female","male","female","male","male")
     ),
     c(1, 2, 10, 3, 4, 1)
     )
     colnames(ss) <- c("sample.id", "species.id", "gender", "catch")

     sscount(ss)
     sscount(ss, zc="zero.count")
     sscount(ss[,c(1,2,4)], zc="zero.count")

     ### Example 2: field data of the dolina

     ## Not run: 
     data(dol.count, dol.sample, landsnail)

     sscount(fill.count(dol.count), zc="zero.count")
     ## End(Not run)

