View source: R/diversityDynamics.r
omit | R Documentation |
Function to quickly omit single-collection and single-reference taxa.
omit( x, om = "ref", tax = "genus", bin = "bin", coll = NULL, ref = NULL, filterNA = FALSE )
x |
|
om |
|
tax |
|
bin |
|
coll |
|
ref |
|
filterNA |
|
The function returns a logical
vector, with a value for each row. TRUE
values indicate rows to be omitted, FALSE
values indicate rows to be kept. The function is embedded in the divDyn
function, but can be called independently.
A logical vector.
# omit single-reference taxa data(corals) data(stages) toOmit <- omit(corals, bin="stg", tax="genus", om="ref", ref="reference_no") x <- corals[!toOmit,] # within divDyn # plotting tsplot(stages, shading="series", boxes="sys", xlim=c(260,0), ylab="range-through diversity (genera)", ylim=c(0,230)) # multiple ref/slice required ddNoSing <- divDyn(corals, tax="genus", bin="stg", om="binref", ref="reference_no") lines(stages$mid, ddNoSing$divRT, lwd=2, col="red") # with the recent included (NA reference value) ddNoSingRec <- divDyn(corals, tax="genus", bin="stg", om="binref", filterNA=TRUE,ref="reference_no") lines(stages$mid, ddNoSingRec$divRT, lwd=2, col="blue") # legend legend("topleft", legend=c("no single-ref. taxa", "no single-ref. taxa,\n with recent"), col=c("red", "blue"), lwd=c(2,2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.