as.qmatrix: Converts into Q matrix

Description Usage Arguments Value Author(s) See Also Examples

View source: R/utils.R

Description

This function tests Q matrix objects, and converts matrix objects into valid Q matrices.

Usage

1

Arguments

Q

an object of class matrix containing a matrix of ancestry coefficients.

Value

An object of class tess3Q.

Author(s)

Kevin Caye, Olivier Fran<c3><a7>ois

See Also

plot.tess3Q barplot.tess3Q

Examples

1
2
3
4
5
6
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")

cayek/TESS3_encho_sen documentation built on July 3, 2017, 4:26 p.m.