drtsscount {mefa}R Documentation

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

Description

The function makes an object of class 'sscount' from a table (data frame), when some samples are presented in more than one rows (identifiers are not unique). Count and measurement type data are allowed.

Usage

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

Arguments

table a data frame with count data. NA values are not allowed.
sample a vector with same length as number of rows in table. Used as factor for coding samples. NA values are not allowed.
segment arbitrary name of the segment (eg. adult, juvenile, male, female), included in the table, by default it is "unspecified".
digits NULL (default) is used when results are count data (eg. number of individuals). If result is not integer, but digits=NULL, error message is given. If results are not of count type but some kind of measurements (eg. biomass, containing decimals) digits can be used to set precision of the data representation, in this case use integers (digits=0 results integers, digits=1 means 1 decimal, etc.).

Value

A result is an object of class 'sscount'.

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.1-2 Index]