xcount                 package:mefa                 R Documentation

_M_a_k_e_s _a_n _O_b_j_e_c_t _o_f _C_l_a_s_s '_x_c_o_u_n_t'

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

     The function makes an object of class 'xcount' from an object of
     class 'sscount'.

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

     xcount(ssc, segment = 0)

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

     ssc: an object of class 'sscount'.

 segment: identifier of the 'segment' within the 'sscount' object to
          make the crosstabulation, the default '0' refers to '"all"'
          segments.

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

     A result is an object of class 'xcount'. 

 segment: segment of the 'sscount' object of which the crosstabulation
          was made, or '"all"'.

    data: matrix containing count data of sample/species
          crosstabulation. Crosstabulation results the same dimensions
          for data matrices of each segments.

nsamples: number of rows (samples) in 'data'.

nspecies: number of columns (species) in 'data'.

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

     'as.xcount', 'check.attrib', 'mefa', 'sscount', 'xorder'

_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")

     xc1 <- xcount(sscount(ss, z="zero"))
     xc1

     xc2 <- xcount(sscount(ss, zc="zero.count"))
     xc2

     xc3 <- xcount(sscount(ss, zc="zero.count"), 0)
     xc3

     xc4 <- xcount(sscount(ss, zc="zero.count"), 1)
     xc4

     ### Example 2: field data of the dolina

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

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

