Last updated: 2022-02-17

Checks: 6 1

Knit directory: codemapper/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

The global environment had objects present when the code in the R Markdown file was run. These objects can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment. Use wflow_publish or wflow_build to ensure that the code is always run in an empty environment.

The following objects were defined in the global environment when these results were created:

Name Class Size
install_codemapper function 1.2 Kb

The command set.seed(20210923) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version a44eb90. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Renviron
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    _targets/
    Ignored:    all_lkps_maps.db
    Ignored:    renv/library/
    Ignored:    renv/staging/
    Ignored:    tar_make.R

Unstaged changes:
    Modified:   .Rbuildignore
    Modified:   DESCRIPTION
    Modified:   NAMESPACE
    Modified:   R/clinical_codes.R
    Modified:   R/codemapper.R
    Modified:   R/constants.R
    Modified:   R/utils.R
    Modified:   _targets.R
    Modified:   analysis/clinical_codes_lkps_and_mappings.Rmd
    Modified:   man/build_all_lkps_maps.Rd
    Modified:   man/reformat_icd10_codes.Rd
    Modified:   tests/testthat/test_constants.R

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/phecodes.Rmd) and HTML (public/phecodes.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd 5c2a3e3 Chuin Ying Ung 2022-02-17 update _targets.R (housekeeping) and phecode.Rmd
html 5c2a3e3 Chuin Ying Ung 2022-02-17 update _targets.R (housekeeping) and phecode.Rmd
Rmd 8d14804 Chuin Ying Ung 2022-02-17 add phecode.Rmd

Overview

Aim: to explore the phecode lookup and mapping files.

Background - phecodes

PheWAS R package

Mapping files

# A tibble: 17,934 × 12
   ICD10_CODE ALT_CODE USAGE   USAGE_UK DESCRIPTION        MODIFIER_4 MODIFIER_5
   <chr>      <chr>    <chr>   <chr>    <chr>              <chr>      <chr>     
 1 A00        A00      DEFAULT 3        Cholera            <NA>       <NA>      
 2 A00.0      A000     DEFAULT 3        Cholera due to Vi… <NA>       <NA>      
 3 A00.1      A001     DEFAULT 3        Cholera due to Vi… <NA>       <NA>      
 4 A00.9      A009     DEFAULT 3        Cholera, unspecif… <NA>       <NA>      
 5 A01        A01      DEFAULT 3        Typhoid and parat… <NA>       <NA>      
 6 A01.0      A010     DEFAULT 3        Typhoid fever      <NA>       <NA>      
 7 A01.1      A011     DEFAULT 3        Paratyphoid fever… <NA>       <NA>      
 8 A01.2      A012     DEFAULT 3        Paratyphoid fever… <NA>       <NA>      
 9 A01.3      A013     DEFAULT 3        Paratyphoid fever… <NA>       <NA>      
10 A01.4      A014     DEFAULT 3        Paratyphoid fever… <NA>       <NA>      
# … with 17,924 more rows, and 5 more variables: QUALIFIERS <chr>,
#   GENDER_MASK <chr>, MIN_AGE <chr>, MAX_AGE <chr>, TREE_DESCRIPTION <chr>

R version 4.1.0 (2021-05-18)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] parallel  stats     graphics  grDevices datasets  utils     methods  
[8] base     

other attached packages:
 [1] PheWAS_0.99.5-5       codemapper_0.0.0.9000 ukbwranglr_0.0.0.9000
 [4] targets_0.8.0         crosstalk_1.1.1       readxl_1.3.1         
 [7] reactable_0.2.3       forcats_0.5.1         stringr_1.4.0        
[10] dplyr_1.0.7           purrr_0.3.4           readr_2.0.2          
[13] tidyr_1.1.4           tibble_3.1.4          ggplot2_3.3.5        
[16] tidyverse_1.3.1       workflowr_1.6.2      

loaded via a namespace (and not attached):
 [1] minqa_1.2.4          colorspace_2.0-2     ellipsis_0.3.2      
 [4] rprojroot_2.0.2      fs_1.5.0             rstudioapi_0.13     
 [7] mice_3.14.0          ggrepel_0.9.1        DT_0.20             
[10] fansi_0.5.0          lubridate_1.7.10     mathjaxr_1.4-0      
[13] xml2_1.3.2           codetools_0.2-18     splines_4.1.0       
[16] knitr_1.34           jsonlite_1.7.2       nloptr_2.0.0        
[19] logistf_1.24.1       broom_0.7.9          dbplyr_2.1.1        
[22] shiny_1.7.0          compiler_4.1.0       httr_1.4.2          
[25] backports_1.2.1      assertthat_0.2.1     Matrix_1.3-3        
[28] fastmap_1.1.0        cli_3.0.1            later_1.3.0         
[31] htmltools_0.5.2      tools_4.1.0          igraph_1.2.6        
[34] gtable_0.3.0         glue_1.4.2           Rcpp_1.0.7          
[37] cellranger_1.1.0     jquerylib_0.1.4      vctrs_0.3.8         
[40] nlme_3.1-152         lmtest_0.9-39        xfun_0.24           
[43] ps_1.6.0             lme4_1.1-28          rvest_1.0.1         
[46] mime_0.12            CompQuadForm_1.4.3   lifecycle_1.0.1     
[49] renv_0.13.2          formula.tools_1.7.1  MASS_7.3-54         
[52] zoo_1.8-9            scales_1.1.1         hms_1.1.1           
[55] promises_1.2.0.1     meta_5.2-0           metafor_3.0-2       
[58] yaml_2.2.1           sass_0.4.0           stringi_1.7.4       
[61] highr_0.9            boot_1.3-28          operator.tools_1.6.3
[64] rlang_0.4.11         pkgconfig_2.0.3      evaluate_0.14       
[67] lattice_0.20-44      htmlwidgets_1.5.4    processx_3.5.2      
[70] tidyselect_1.1.1     magrittr_2.0.1       R6_2.5.1            
[73] generics_0.1.0       DBI_1.1.1            pillar_1.6.3        
[76] haven_2.4.3          whisker_0.4          withr_2.4.2         
[79] mgcv_1.8-35          survival_3.2-13      modelr_0.1.8        
[82] crayon_1.4.1         utf8_1.2.2           tzdb_0.1.2          
[85] rmarkdown_2.11       grid_4.1.0           data.table_1.14.2   
[88] callr_3.7.0          git2r_0.28.0         reprex_2.0.1        
[91] digest_0.6.28        xtable_1.8-4         httpuv_1.6.3        
[94] munsell_0.5.0        bslib_0.3.0