ttsscount {mefa}R Documentation

Make Object of Class 'sscount' from Table

Description

The function makes an object of class 'sscount' from a table (data frame). Count and measurement type data are allowed.

Usage

ttsscount(table, species.columns = TRUE, segment = "unspecified", digits = NULL)

Arguments

table a data frame. NA values are not allowed.
species.columns logical, if TRUE (default), species are columns, if FALSE, species are rows.
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'.

Author(s)

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

See Also

drtsscount, sscount

Examples

### Example 1: simple atrificial data

xc <- as.data.frame(rbind(
c(4, 0, 0),
c(2, 4, 0),
c(0, 0, 5),
c(0, 0, 0)
))
rownames(xc) <- c("sample1", "sample2", "sample3", "sample4")
colnames(xc) <- c("species1", "species2", "species3")

ttsscount(xc)

### Example 2: field data of Villany Hills

## Not run: 
data(vtable)

v1 <- ttsscount(vtable, FALSE)
v1

v2 <- ttsscount(vtable, species.columns = FALSE, segment = "adult")
v2

v3 <- ttsscount(vtable)
v3
## End(Not run)

[Package mefa version 1.1-2 Index]