Description Usage Arguments Value Examples
Check the chunk size whether it is over the given number of variables(vaiants) in genotype data. If yes, reset the chunk size equal to the number of variables(vaiants).
1 | checkchunksize(c, m, n = NULL, ...)
|
c |
an integer indicating the set chunk size. |
m |
an integer indicating the number of variables(vaiants) in |
n |
an integer indicating the number of variables(vaiants) in |
... |
not used. |
an integer indicating the chunk size
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | set.seed(123)
geno1 <- matrix(sample(0:2, size = 1000, replace = TRUE, prob = c(0.5, 0.3, 0.2)),
ncol = 10)
geno2 <- matrix(sample(0:2, size = 2000, replace = TRUE, prob = c(0.4, 0.3, 0.3)),
ncol = 20)
# if chunk size is smaller, there is no problem
chunksize <- 10
checkchunksize(chunksize, ncol(geno1))
# if chunk size is bigger than the number of columns in genotype input,
# set chunk size equal to the number of columns in genotype input
chuksize <- 12
checkchunksize(chunksize, ncol(geno1))
# if chunk size is bigger than the number of columns of geno1 and geno2,
# set chunk size equal to the minima nunumber of columns of geno1 and geno2
chunksize <- 50
checkchunksize(chunksize, ncol(geno1), ncol(geno2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.