View source: R/gt_impute_simple.R
gt_impute_simple | R Documentation |
This function provides a very simple imputation algorithm for gen_tibble
objects by using the mode, mean or sampling from the allele frequencies. Each
locus is imputed independently (and thus linkage information is ignored).
gt_impute_simple(x, method = c("mode", "mean0", "random"), n_cores = 1)
x |
a gen_tibble with missing data |
method |
one of
|
n_cores |
the number of cores to be used |
This function is a wrapper around bigsnpr::snp_fastImputeSimple()
.
a gen_tibble with imputed genotypes
example_gt <- load_example_gt("gen_tbl")
# Impute the gen_tibble
example_gt <- example_gt %>% gt_impute_simple()
# And we can check it has been imputed
example_gt %>% gt_has_imputed()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.