Learn R Programming

mefa (version 1.1-4)

ttsscount: 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. bi

Value

  • A result is an object of class 'sscount'.

See Also

drtsscount, sscount

Examples

Run this code
### 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

data(vtable)

v1 <- ttsscount(vtable, FALSE)
v1

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

v3 <- ttsscount(vtable)
v3

Run the code above in your browser using DataLab