Learn R Programming

evolqg (version 0.3-4)

PlotRarefaction: Plot Rarefaction analysis

Description

A specialized ploting function displays the results from Rarefaction functions in publication quality.

Usage

PlotRarefaction(
  comparison.list,
  y.axis = "Statistic",
  x.axis = "Number of sampled specimens"
)

Value

ggplot2 object with rarefaction plot

Arguments

comparison.list

output from rarefaction functions can be used in ploting

y.axis

Y axis lable in plot

x.axis

Y axis lable in plot

Author

Diogo Melo, Guilherme Garcia

See Also

BootstrapRep

Examples

Run this code
# \donttest{
ind.data <- iris[1:50,1:4]

results.RS <- Rarefaction(ind.data, PCAsimilarity, num.reps = 5)
results.Mantel <- Rarefaction(ind.data, MatrixCor, correlation = TRUE, num.reps = 5)
results.KrzCov <- Rarefaction(ind.data, KrzCor, num.reps = 5)
results.PCA <- Rarefaction(ind.data, PCAsimilarity, num.reps = 5)

#Plotting using ggplot2
a <- PlotRarefaction(results.RS, "Random Skewers")
b <- PlotRarefaction(results.Mantel, "Mantel")
c <- PlotRarefaction(results.KrzCov, "KrzCor")
d <- PlotRarefaction(results.PCA, "PCAsimilarity")

library(cowplot)
plot_grid(a, b, c, d, labels = c("RS",
                                 "Mantel Correlation",
                                 "Krzanowski Correlation",
                                 "PCA Similarity"),
                      scale = 0.9)
# }

Run the code above in your browser using DataLab