strify                 package:mefa                 R Documentation

_S_t_r_a_t_i_f_i_e_s _O_b_j_e_c_t _o_f _C_l_a_s_s '_x_c_o_u_n_t' _o_r '_m_e_f_a'

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

     Stratifies an object of class 'xcount' or 'mefa' according to
     levels of a factor, or sample/species attribute, respectively.

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

     strify(xc, strata, which = c("samples", "species"))

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

      xc: an object of class 'xcount' or 'mefa' to be stratified.

  strata: a vector with length equal to the number of samples/species
          (according to 'which' argument). For a 'mefa' object 'strata'
          is a column within the samples/species attribute table
          (according to 'which' argument).

   which: switch between rows ('"samples"') and columns ('"species"')
          to be stratified.

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

     A result is an object of class 'xcount'. 

 segment: segment of the original object.

    data: matrix containing count data of sample/species
          crosstabulation with dimensions according to stratification.
          Total count value is the same for the new object, but counts
          within strata are summed according to stratification.

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',  'xcount',
     'xorder'

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

     ## Not run: 
     data(landsnail, vhabitat, vsample, vtable)

     v1 <- as.xcount(vtable, FALSE, segment="mixed")
     spec <- xorder(v1, which="species", landsnail, 2)
     sampl <- xorder(v1, which="samples", vsample)
     vmf <- mefa(v1, sampl, spec)

     v2 <- strify(vmf, strata = "site.descr", which = "samples")
     v2

     check.attrib(v2, which="samples", vhabitat, 2)
     habi <- xorder(v2, which="samples", vhabitat, 2)
     vmf2 <- mefa(v2, habi, spec)

     v3 <- strify(vmf2, strata = "familia", which = "species")
     v3
     ## End(Not run)

