# NOT RUN {
# }
# NOT RUN {
<!-- % library(miraculix) -->
# }
# NOT RUN {
as.matrix(rhaplo(seq(0, 1, len=10), indiv=5))
## note that the next examples write a file on the current directory
file <- "miraculix"
if (interactive() && !file.exists(paste0(file, ".bgl"))) {
f <- rhaplo(freq = c(0.1, 0.2, 0.3, 0.4, 0.5, 0.6),
freq2 = c(0.6, 0.4, 0.5, 0.3, 0.0, 1.0),
indiv=5, file=file, file.type="beagle",
debugging = TRUE)
print(f)
print(as.genomicmatrix(f))
print(g <- genomicmatrix(f))
print(as.matrix(g))
stopifnot(all(as.matrix(g) == attr(f, "M")))
file.remove(f)
}
# }
Run the code above in your browser using DataLab