This function allows you to make a membership probability plot (stacked-bar plot) using results estimated from K-fold cross-validation.
membership.plot(
dir = NULL,
style = NULL,
non.genetic = FALSE,
plot.k = NULL,
plot.loci = NULL
)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.
A character string to specify the folder that has your K-fold cross-validation assignment results. A slash should be entered at the end.
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.
A logical variable to specify if data are non-genetic. Set it TRUE if you're analyzing non-genetic alone.
A number to specify which K of the data set should be plotted. If not given, it will prompt the question.
The proportion of training loci used in your K-fold cross-validation analysis. Specify one of the numbers here to skip question prompt.