structurePlot(
q.mat,
pop.col = 3,
prob.col = 4,
sort.probs = TRUE,
label.pops = TRUE,
col = NULL,
horiz = TRUE,
type = NULL,
legend.position = c("top", "left", "right", "bottom", "none"),
plot = TRUE
)
matrix or data.frame of assignment probabilities.
column number identifying original population designations.
column number of first assignment probabilities to first
group. It is assumed that the remainder of columns
(prob.col:ncol(q.mat)
) contain all assignment probabilities.
logical. Sort individuals by probabilities within
populations? If FALSE
individuals will be plotted as in
q.mat
.
logical. Label the populations on the plot?
colors to use for each group.
logical. Plot bars horizontally.
either "area"
for stacked continuous area plot or
"bar"
for discrete stacked bar chart. The latter is prefered for
small numbers of samples. If not specified, a bar chart will be used if
there are <= 100 samples.
the position of the legend ("top", "left",
"right", "bottom"
, or two-element numeric vector).
display plot?
invisibly, the ggplot object