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

View source: R/visualizations.r

poppr.plotR Documentation

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

## 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))
}

## End(Not run)


poppr documentation built on May 29, 2024, 5:54 a.m.