simX | R Documentation |
This function provides a method for generating sequence data containing only 0, 1 and 2, which can be used to simulate the generation of sequence genotypes.
simX(n, m, seed = 1, d.ratio = 0)
n |
an interger variable specifying the number of samples to be generated. |
m |
an interger variable specifying the sequence length of each sample. |
seed |
an integer variable specifying the random seed used for random sequence generation. |
d.ratio |
a numeric variable between 0 and 1 indicating the deletion ratio of sample sequences, default value is 0. |
An "simX" object that contains the list of the following items.
location: a numeric vector defining the sampling sites of the sequence data.
X: a matrix with n rows and m columns representing the sequence data.
See Also as plotRawdata
, SNPgvf
.
library(FunctanSNP) n <- 2 m <- 50 simdata1 <- simX(n, m, seed = 1, d.ratio = 0) simdata2 <- simX(n, m, seed = 1, d.ratio = 0.3) plotRawdata(location = simdata1$location, X = simdata1$X) plotRawdata(location = simdata2$location, X = simdata2$X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.