Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add callout box for common NA strings #154

Open
avallecam opened this issue Nov 5, 2024 · 0 comments
Open

add callout box for common NA strings #154

avallecam opened this issue Nov 5, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@avallecam
Copy link
Member

and make this possible

cleanepi::common_na_strings
#>  [1] "missing"       "NA"            "N A"           "N/A"          
#>  [5] "#N/A"          "NA "           " NA"           "N /A"         
#>  [9] "N / A"         " N / A"        "N / A "        "na"           
#> [13] "n a"           "n/a"           "na "           " na"          
#> [17] "n /a"          "n / a"         " a / a"        "n / a "       
#> [21] "NULL"          "null"          ""              "\\?"          
#> [25] "\\*"           "\\."           "not available" "Not Available"
#> [29] "NOt available" "not avail"     "Not Avail"     "nan"          
#> [33] "NAN"           "not a number"  "Not A Number"

library(tidyverse)

tibble::tribble(
  ~case_id,  ~outcome, ~gender,            ~hospital,
  "d1fafd",      "NA",     "f",  "Military Hospital",
  "53371b",      "NA",     "m", "Connaught Hospital",
  "f5c3d8", "Recover",     "f",              "other",
  "6c286a",   "Death",     "f",                 "NA",
  "0f58c4", "Recover",     "f",              "other"
) %>% 
  cleanepi::replace_missing_values(
    target_columns = "outcome"
  )
#> # A tibble: 5 × 4
#>   case_id outcome gender hospital          
#>   <chr>   <chr>   <chr>  <chr>             
#> 1 d1fafd  <NA>    f      Military Hospital 
#> 2 53371b  <NA>    m      Connaught Hospital
#> 3 f5c3d8  Recover f      other             
#> 4 6c286a  Death   f      NA                
#> 5 0f58c4  Recover f      other

Created on 2024-11-05 with reprex v2.1.1

@avallecam avallecam added the enhancement New feature or request label Nov 5, 2024
@avallecam avallecam moved this to Todo in tutorials-planning Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant