# \donttest{
tmp <- tempfile(fileext = ".h5")
# SNP data: 0/1/2 coded, 3 = missing (not NA)
snps <- matrix(sample(c(0L, 1L, 2L, 3L), 100 * 20,
replace = TRUE,
prob = c(0.3, 0.3, 0.3, 0.1)),
nrow = 100, ncol = 20)
X <- hdf5_create_matrix(tmp, "geno/raw", data = snps)
imp <- impute_snps(X, out_group = "geno", out_dataset = "imputed")
dim(imp)
hdf5_close_all()
unlink(tmp)
# }
Run the code above in your browser using DataLab