Plot results from smw
and dp
objects. The command is a shortcut for extracting and plotting SMW
resuts. Auxiliary arguments from extract
(i.e. sig
, z
, BPs
and seq.sig
) can be passed to plot.smw
. The auxilary method bgDP
is available for the returned dp
object when the argument bg
is not NULL (see Details).
# S3 method for smw
plot(x, w = NULL, sig = "z", z = 1.85, BPs = "max",
seq.sig = 3, w.effect = F, values = c("zscore", "diss"),
pchs = c(16, 16, 17), cols = c("black", "red", "blue"), bg = NULL,
bg_alpha = 0.1, wcols = "rainbow", legend = TRUE, ...)# S3 method for dp
bgDP(dp)
An object of class "smw"
resulted from the function SMW
.
The window size from which results will be plotted. Only effective if length(smw)>1
.
Significance test for detecting dissimilarity values that differs significantly from those appearing in a random pattern. If NULL
the significance test is ommited from the plot.The following tests are considered with default to sig.test="z"
:
'z'
consider normalized dissimilarity (z-scores) discontinuities that exceed a "z" critical value;
'sd'
consider dissimilarity discontinuities that exceed mean plus one standard deviation;
'SD2'
consider dissimilarity discontinuities that exceed mean plus two standard deviation;
'tail1'
Consider dissimilarity discontinuities that exceed 95 percent confidence limits.
The critical value for the significance of z-values. Defaults to 'z=1.85'
(Erd<U+00F6>s et.al, 2014).
Defines if the breakpoints should be chosen as those sample positions corresponding to the maximum dissimilarity in a sequence of significant values ("max"
) or as those sample positions corresponding to the median position of the sequence ("median"
). Defaults to BPs="max"
. If NULL
the breakpoints are not computed.
The maximum length of consecutive, significant values of dissimilarity that will be considered in defining the community breakpoints. Defaults to seq.sig=3
;
Logical, if TRUE
draws a dissimilarity profile using different windows sizes and returns an invisible data.frame with the breakpoint frequencies. Only effective if length(smw)>1
. The function uses extract
with defaults parameters to define the breakpoint positions for each of the evaluated window sizes.
Character. "zscore"
for plotting z-scores, "diss"
for plotting dissimilarity values.
A numerical vector of the form c(d,s,b)
which modifies the default symbols of the plot. The default pch = c(16,16,17)
describes respectively the dissimilarity values, significant dissimilarity values and breakpoints.
Vector of length 3 specifying the colors of the plot in the same way as the pch argument. Defaults to colors=c("black","red","blue")
.
Optional. Sets background colors according to the breakpoints. It can be expressed either by a vector of colors or by the name of a pallet function (e.g. "rainbow"
).
Factor modifying the opacity alpha of the backgroud [0,1].
Sets the colors for the window sizes (lines) when w.effect=TRUE
. It can be expressed by a vector of colors or by the name of a pallet function. Defaults to wcol="rainbow"
which uses the colour palette rainbow
from R stats.
Logical. Should a default legend appear?
Further graphical parameters.
An object of class dp
.
The function returns invisibly an object of class "dp"
(see Details).
If bg
is not NULL
, the attribute params$bg
is added to the returned dp
. This attribute contains the sample colors used by the argument bg
. The auxilary method bgDP
can be used for accessing this color vector.
# NOT RUN {
data(sim1)
sim1o<-OrdData(sim1$envi,sim1$comm)
# }
# NOT RUN {
ws20<-SMW(yo=sim1o$yo,ws=20)
pool<-SMW(yo=sim1o$yo,ws=c(20,30,40))
plot(ws20)
plot(pool, w.effect=TRUE)
# }
Run the code above in your browser using DataLab