| sscount {mefa} | R Documentation |
The function makes an object of class 'sscount' from a data frame with columns for samples, species, count and optionally segment.
sscount(sstable, zc = "NULL")
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. |
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. |
Peter Solymos, Solymos.Peter@aotk.szie.hu, http://www.univet.hu/users/psolymos/personal/
drtsscount, fill.count, inflate, sscount,
ttsscount
### 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)