Learn R Programming

mefa (version 1.1-4)

drtsscount: 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. b

Value

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

See Also

sscount, ttsscount

Examples

Run this code
data(vsample, vtable)

v1 <- drtsscount(t(vtable), vsample$site.descr)
v1

v2 <- drtsscount(t(vtable), vsample$site.descr, segment = "adult")
v2

Run the code above in your browser using DataLab