drtsscount {mefa} | R Documentation |
The function makes an object ofclass 'sscount' from a table (data frame), when some samples are presented in more than one rows (identifiers are not unique).
drtsscount(table, sample, segment = "unspecified")
table |
a data frame with count data. |
sample |
a vector with same langth as number of rows in table . Used as factor for coding samples. |
segment |
arbitrary name of the segment (eg. adult, juvenile, male, female), included in the table,
by default it is "unspecified" . |
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. |
In table
, columns must refer to species, unlike in ttsscount
, where species can be rows either by using the species.columns = False
argument. If this is the case, transpose the data frame as in the example below. Samples(rows) with 0 total count are flagged as 'zero.count' in the resulting 'sscount' object.
Peter Solymos, Solymos.Peter@aotk.szie.hu, http://www.univet.hu/users/psolymos/personal/
## Not run: data(vsample, vtable) v1 <- drtsscount(t(vtable), vsample$site.descr) v1 v2 <- drtsscount(t(vtable), vsample$site.descr, segment = "adult") v2 ## End(Not run)