bed2matrix | R Documentation |
Convert a bed to a matrix
bed2matrix(bedfile, n = NULL, p = NULL)
bedfile |
Path to a bed file. |
n |
Number of samples. Default reads it from corresponding fam file. |
p |
Number of SNPs. Default reads it from corresponding bim file. |
An integer matrix.
bedfile <- system.file("extdata", "geno3pops.bed", package = "pcadapt")
mat <- bed2matrix(bedfile)
dim(mat)
table(mat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.