xcount {mefa} | R Documentation |
The function makes an object of class 'xcount' from an object of class 'sscount'.
xcount(ssc, segment = 0)
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. |
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 . |
Peter Solymos, Solymos.Peter@aotk.szie.hu, http://www.univet.hu/users/psolymos/personal/
as.xcount
, check.attrib
, mefa
,
sscount
, xorder
### 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)