membership.plot: Make a membership probability plot using results from K-fold...

Description Usage Arguments Value

View source: R/membership.plot.R

Description

This function allows you to make a membership probability plot (stacked-bar plot) using results estimated from K-fold cross-validation.

Usage

1
2
3
4
5
6
7
membership.plot(
  dir = NULL,
  style = NULL,
  non.genetic = FALSE,
  plot.k = NULL,
  plot.loci = NULL
)

Arguments

dir

A character string to specify the folder that has your K-fold cross-validation assignment results. A slash should be entered at the end.

style

An option for output style. If style=1, it creates the plot which individuals on the x-axis are in random order. If style=2, individuals are sorted by probabilities within each population. If style=3, individuals of different folds are in seperate plots. If style=4, individuals are separated by fold and sorted by probability.

non.genetic

A logical variable to specify if data are non-genetic. Set it TRUE if you're analyzing non-genetic alone.

plot.k

A number to specify which K of the data set should be plotted. If not given, it will prompt the question.

plot.loci

The proportion of training loci used in your K-fold cross-validation analysis. Specify one of the numbers here to skip question prompt.

Value

This function returns a stacked-bar plot using the ggplot2 library. Users can modified the plot (e.g., change color, text, etc.) using functions provided by ggplot2 library.


assignPOP documentation built on Oct. 28, 2021, 1:06 a.m.