bigsnp <- snp_attachExtdata("example-missing.bed")
G <- bigsnp$genotypes
G[, 2] # some missing values
G2 <- snp_fastImputeSimple(G)
G2[, 2] # no missing values anymore
G[, 2] # imputed, but still returning missing values
G$copy(code = CODE_IMPUTE_PRED)[, 2] # need to decode imputed values
G$copy(code = c(0, 1, 2, rep(0, 253)))[, 2] # "imputation" by 0
Run the code above in your browser using DataLab