+.count {untb} | R Documentation |
Add two count objects
Description
Adds two count objects
Usage
## S3 method for class 'count'
a + b
## S3 method for class 'census'
a + b
Arguments
a , b |
objects of class |
Details
Consider count objects a
and b
. Then a+b
is a
count object that records the number of each species in a
and
b
combined. It is as though the organisms in the surveys were
pooled.
Census objects are coerced to count objects, added, then the result coerced to a count object.
The operation is commutative and associative.
One might think that the addition method should use the frab package, but this would not account for extinct species.
Author(s)
Robin K. S. Hankin, based on an R-help tip from Gabor Grothendiek
Examples
a <- count(c(dogs=4,pigs=0,slugs=5))
b <- count(c(slugs=4,hogs=1,frogs=19))
a+b
[Package untb version 1.7-7 Index]