ttsscount {mefa}R Documentation

Makes Object of Class 'sscount' from Table

Description

The function makes an object of class 'sscount' from a table (data frame).

Usage

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

Arguments

table a data frame.
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".

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.

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.0 Index]