gt_has_imputed: Checks if a 'gen_tibble' has been imputed

View source: R/gt_has_imputed.R

gt_has_imputedR Documentation

Checks if a gen_tibble has been imputed

Description

This function checks if a dataset has been imputed. Note that having imputation does not mean that the imputed values are used.

Usage

gt_has_imputed(x)

Arguments

x

a gen_tibble

Value

boolean TRUE or FALSE depending on whether the dataset has been imputed

Examples

example_gt <- load_example_gt("gen_tbl")

# The initial gen_tibble contains no imputed values
example_gt %>% gt_has_imputed()

# Now impute the gen_tibble
example_gt <- example_gt %>% gt_impute_simple()

# And we can check it has been imputed
example_gt %>% gt_has_imputed()

tidypopgen documentation built on Aug. 28, 2025, 1:08 a.m.