View source: R/simer.Genotype.r
geno.cvt2 | R Documentation |
Convert genotype matrix from (0, 1, 2) to (0, 1).
geno.cvt2(pop.geno, ncpus = 0)
pop.geno |
genotype matrix of (0, 1, 2). |
ncpus |
the number of threads used, if NULL, (logical core number - 1) is automatically used. |
Build date: Jul 11, 2020 Last update: Jan 29, 2025
genotype matrix of (0, 1).
Dong Yin
library(bigmemory)
options(bigmemory.typecast.warning=FALSE)
pop.geno <- matrix(sample(c(0, 1, 2), 8, replace = TRUE), 2, 4)
pop.geno[]
bigmat <- geno.cvt2(pop.geno)
bigmat[]
pop.geno <- as.big.matrix(pop.geno, type = 'char')
bigmat <- geno.cvt2(pop.geno)
bigmat[]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.