From 7be2d65d278ac7ffec70a6bfa9779f0578f7c9be Mon Sep 17 00:00:00 2001 From: Kyle Belanger Date: Mon, 9 Jan 2023 09:37:37 -0500 Subject: [PATCH] Update 1-data-exploration.R --- ML/1-data-exploration.R | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ML/1-data-exploration.R b/ML/1-data-exploration.R index 8052b6d..e7c6572 100644 --- a/ML/1-data-exploration.R +++ b/ML/1-data-exploration.R @@ -14,6 +14,10 @@ box::use( ) +# globals ----------------------------------------------------------------- + + + # load data --------------------------------------------------------------- @@ -37,8 +41,13 @@ ds_high_tsh <- ds_high_tsh %>% # basic visualization ----------------------------------------------------- +test <- dplyr$as_tibble(colSums(is.na(ds_high_tsh)), rownames = NA ) %>% + tibble::rownames_to_column() + + + g1 <- ds_high_tsh %>% dplyr$select(-subject_id, - charttime) %>% dplyr$mutate(dplyr$across(gender, ~dplyr$recode(.,M = 1, F = 2))) %>% - tidyr$pivot_longer(cols = dplyr$everything()) %>% + tidyr$pivot_longer(cols = dplyr$everything())