In package untb, ecosystem data is held in one of two preferred forms:
census data and count data. Function
as.census() coerces to
1 2 3
Ecosystem data. In function
A “census” object is a list of individuals in the form of an unnamed vector whose elements indicate the individuals' species; compare “count” objects.
An object of class “census” is also an unordered factor. The levels are always in alphabetical order.
census() takes an object of class “count” and
returns an object of class “census”. This function is not
really intended for the end user.
as.census() coerces to class “count” then
census() of the result.
Returns an object of class “census”.
Robin K. S. Hankin
1 2 3 4 5 6 7 8 9 10 11 12 13
jj <- c(dogs=4,pigs=10,slugs=0,fish=1) x <- census(jj) # slugs appear as zero abundance extant(x) # slugs gone x+x # count method for census objects: order of elements lost as.census(jj) # probably NOT what you meant 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.