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

Description Usage Arguments Value Examples

View source: R/visualizations.r

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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 Jan. 13, 2021, 8:33 a.m.