drtsscount {mefa}R Documentation

Makes Object of Class 'sscount' from Table with Duplicate Rows

Description

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).

Usage

drtsscount(table, sample, segment = "unspecified")

Arguments

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".

Value

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.

Note

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.

Author(s)

Peter Solymos, Solymos.Peter@aotk.szie.hu, http://www.univet.hu/users/psolymos/personal/

See Also

sscount, ttsscount

Examples

## 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)

[Package mefa version 1.0 Index]