ttsscount {mefa} | R Documentation |
The function makes an object of class 'sscount' from a table (data frame). Count and measurement type data are allowed.
ttsscount(table, species.columns = TRUE, segment = "unspecified", digits = NULL)
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.). |
A result is an object of class 'sscount'.
Peter Solymos, Solymos.Peter@aotk.szie.hu, http://www.univet.hu/users/psolymos/personal/
### 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)