Description Usage Arguments Value Examples
Generate a summary of a TRAMP
object, by producing a
presence/absence matrix. This is the preferred way of extracting the
presence/absence matrix from a TRAMP
object, and allows for
grouping, naming knowns, and ignoring matches (specified by
remove.TRAMP.match
).
1 2 |
object |
A |
name |
Logical: Should the knowns be named? |
grouped |
Logical: Should the knowns be grouped? |
ignore |
Logical: Should matches marked as ignored be excluded? |
... |
Further arguments passed to or from other methods. |
A presence/absence matrix, with samples as rows
and knowns as columns. If name
is TRUE
, then names of
knowns (or groups of knowns) are used, otherwise the knowns.fk
is used (group.strict
if grouped). If grouped
is
TRUE
, then the knowns are collapsed by group (using
group.strict
; see group.knowns
). A group is
present if any of the knowns belonging to it are present. If
ignore
is TRUE
, then any matches marked by
remove.TRAMP.match
are excluded.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | data(demo.knowns)
data(demo.samples)
res <- TRAMP(demo.samples, demo.knowns)
head(summary(res))
head(summary(res, name=TRUE))
head(summary(res, name=TRUE, grouped=TRUE))
## Extract the species richness for each sample (i.e. the number of
## knowns present in each sample)
rowSums(summary(res, grouped=TRUE))
## Extract species frequencies and plot a rank abundance diagram:
## (i.e. the number of times each known was recorded)
sp.freq <- colSums(summary(res, name=TRUE, grouped=TRUE))
sp.freq <- sort(sp.freq[sp.freq > 0], decreasing=TRUE)
plot(sp.freq, xlab="Species rank", ylab="Species frequency", log="y")
text(1:2, sp.freq[1:2], names(sp.freq[1:2]), cex=.7, pos=4, font=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.