# NOT RUN {
# }
# NOT RUN {
<!-- % library(miraculix) -->
# }
# NOT RUN {
require(RandomFieldsUtils)
set.seed(0)
indiv <- sample(1000, 1)
snps <- indiv * 2^sample(7,1)
M <- matrix(nrow = snps, sample(0:2, snps * indiv, replace=TRUE))
storage.mode(M) <- sample(c("integer", "double"), 1)
CM <- genomicmatrix(M)
str(CM)
Z <- as.matrix(CM)
Print(M, CM, Z)
stopifnot(all(M == Z))
N <- sample(snps, snps / 4)
Z1 <- as.matrix(CM, snps=N)
stopifnot(all(M[N, ] == Z1))
# }
Run the code above in your browser using DataLab