census {untb}R Documentation

Construct, coerce, and test for a census object

Description

In package untb, ecosystem data is held in one of two preferred forms: census data and count data. Function as.census() coerces to census format

Usage

census(a)
as.census(a)
is.census(a)

Arguments

a Ecosystem data. In function as.census(), if a table, interpret as species count data; otherwise, interpret as census data

Details

Semantically, a “census” is a list of individuals. In R idiom, a census is a vector whose elements indicate the individuals' species.

An object of class census is an unordered factor. The levels are always in alphabetical order; the vector itself is sorted so that the individuals of the most abundant species appear first, individuals of the second most abundant species appear second, and so on: the singletons appear last.

Function census() takes an object of class “count” and returns an object of class “census”

Value

Returns an object of class “census”.

Author(s)

Robin K. S. Hankin

See Also

count

Examples


a <- c(rep("oak",5) ,rep("ash",2),rep("elm",3),rep("xx",4))
# note that "a" is a plain vector here.
as.census(a)

[Package untb version 1.0-20 Index]