ttsscount                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

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

     The function makes an object of class 'sscount' from a table (data
     frame).

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

     ttsscount(table, species.columns = TRUE, segment = "unspecified")

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

   table: a data frame.

species.columns: logical, if 'TRUE' (default), species are columns, if
          'FALSE', species are rows.

 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.

_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', 'sscount'

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

     ### Example 1: simple atrificial data

     xc <- as.data.frame(rbind(
     c(4, 0, 0),
     c(2, 4, 0),
     c(0, 0, 5),
     c(0, 0, 0)
     ))
     rownames(xc) <- c("sample1", "sample2", "sample3", "sample4")
     colnames(xc) <- c("species1", "species2", "species3")

     ttsscount(xc)

     ### Example 2: field data of Villany Hills

     ## Not run: 
     data(vtable)

     v1 <- ttsscount(vtable, FALSE)
     v1

     v2 <- ttsscount(vtable, species.columns = FALSE, segment = "adult")
     v2

     v3 <- ttsscount(vtable)
     v3
     ## End(Not run)

