Learn R Programming

poppr (version 2.6.1)

poppr.plot: Internal function to plot the results from ia() and poppr()

Description

Internal function to plot the results from ia() and poppr()

Usage

poppr.plot(sample, pval = c(Ia = 0.05, rbarD = 0.05), pop = NULL,
  file = NULL, N = NULL, observed = c(Ia = 0, rbarD = 0),
  index = c("rbarD", "Ia"), labsize = rel(3), linesize = rel(1))

Arguments

sample

either an object of class "ialist" or a list of ialists

pval

a named vector specifying the p values to display

pop

The name of the population

file

The name of the source file

N

The number of samples in the population

observed

observed values of Ia and rbarD

index

The index to plot (defaults to "rbarD")

labsize

size of the in-plot label

linesize

size of the in-plot line

Value

a ggplot2 object

Examples

Run this code
# NOT RUN {
data(Pinf)
x <- Pinf %>% seppop() %>% lapply(ia, sample = 99, valuereturn = TRUE, quiet = TRUE, plot = FALSE)
x
poppr:::poppr.plot(sample = x, file = "hey") # plots multiple populations
# plot.ialist takes care of the single populations.
for (i in x){
  print(plot(i))
}
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab