as.qmatrix | R Documentation |
This function tests Q matrix objects, and converts matrix
objects into valid Q matrices.
as.qmatrix(Q)
Q |
an object of class |
An object of class tess3Q
.
Kevin Caye, Olivier François
plot.tess3Q
barplot.tess3Q
library(tess3r)
## an example with 3 individuals and 2 clusters
Qmatrix <- matrix(c(0.4,0.6,0.3,0.7, 0.2, 0.8), byrow = TRUE, nrow = 3)
Qmatrix <- as.qmatrix(Qmatrix)
barplot(Qmatrix, space = 0, xlab = "individuals",
ylab = "Ancestry proportions", main = "Ancestry matrix")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.