density functions can directly access the permutation
results of plot can display the
densities. The densityplot method can access and display the
permutation results of functions that return permutations of several
statistics simultaneously.## S3 method for class 'adonis':
density(x, ...)
## S3 method for class 'vegandensity':
plot(x, main = NULL, xlab = NULL, ylab = "Density",
type = "l", zero.line = TRUE, obs.line = TRUE, ...)density and
densityplot this is an object containing permutations. For
plot this is a result of density
function.plot.density and densityplot
functions.TRUE draws a red line, and
FALSE draws nothing. Alternatively, obs.line can be a
definition of the colour used for the line, either as a numeridensity these are passed to density.default.density function returns the standard density
result object with one new item: "observed" for the observed
value of the statistic. The functions have a specific plot
method, but otherwise they use methods for
density.default, such as print and lines.density and densityplot function can directly access
permutation results of most density
function is identical to density.default and takes all
its arguments, but adds the observed statistic to the result as item
"observed". The observed statistic is also put among the
permuted values so that the results are consistent with significance
tests. The plot method is similar to the default
plot.density, but can also add the observed statistic to
the graph as a vertical line. The densityplot function is
based on the same function in the densityplot). The density methods are available for adonis, anosim, mantel,
mantel.partial, mrpp,
permutest.cca, and protest. The
density function for oecosimu is documented
separately, and it is also used for adipart,
hiersimu and multipart.
All density functions return an object of class
"vegandensity" inheriting from density, and can
be plotted with its plot method. This is identical to the
standard plot of densiy objects, but can also add a
vertical line for the observed statistic.
Functions that can return several permuted statistics simultaneously
also have densityplot method
(adonis, oecosimu and diversity
partitioning functions based on oecosimu). The standard
density can only handle univariate data, and a warning
is issued if the function is used for a model with several observed
statistics. The densityplot method is available
for adonis and oecosimu (documented
separately). NB, there is no density method for
anova.cca, but only for permutest.cca.
density.default.data(dune)
data(dune.env)
mod <- adonis(dune ~ Management, data = dune.env)
plot(density(mod))
mod <- adonis(dune ~ Management * Moisture, dune.env)
densityplot(mod)Run the code above in your browser using DataLab