densityanomaly | R Documentation |
Plots kernel density anomaly for each survey, which is defined as the difference between kernel density for each survey and mean kernel density across all surveys. The intent of this function is to highlight areas in which density is higher or lower for specific surveys than it is on average.
The input argument is an object returned from makeriverdensity.
densityanomaly(
x,
whichplots = NULL,
method = c("overlap", "both", "positive", "negative"),
negative_ramp = "blue",
positive_ramp = "red",
parmfrow = NULL,
...
)
x |
An object returned from makeriverdensity. |
whichplots |
A vector of plots to produce, if multiple plots are
produced. For example, specifying |
method |
Whether to produce plots for positive and negative anomalies
overlayed ( |
negative_ramp |
Color ramp to use for negative anomaly (see plot.riverdensity
for more details). Defaults to |
positive_ramp |
Color ramp to use for negative anomaly (see plot.riverdensity
for more details). Defaults to |
parmfrow |
Optional argument to |
... |
Additional arguments to plot.riverdensity. |
NULL
Matt Tyers
makeriverdensity, plot.riverdensity, plotriverdensitypoints
data(Gulk, fakefish)
Gulk_dens <- makeriverdensity(seg=fakefish$seg, vert=fakefish$vert, rivers=Gulk,
survey=fakefish$flight.date)
# first, the behavior of plot.riverdensity
# # 10 plots will be created, recommend calling par(mfrow=c(2,5))
plot(x=Gulk_dens)
# next, showing densityanomaly
densityanomaly(x=Gulk_dens, parmfrow=c(2,5))
densityanomaly(x=Gulk_dens, method="negative", parmfrow=c(2,5))
densityanomaly(x=Gulk_dens, method="positive", parmfrow=c(2,5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.