Last updated: 2024-06-12

Checks: 6 1

Knit directory: ~/dynamicHRpaper/

This reproducible R Markdown analysis was created with workflowr (version 1.7.1). 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.

Great job! The global environment was empty. Objects defined in the global environment 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.

The command set.seed(20240612) 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.

Using absolute paths to the files within your workflowr project makes it difficult for you and others to run your code on a different machine. Change the absolute path(s) below to the suggested relative path(s) to make your code more reproducible.

absolute relative
~/dynamicHRpaper/ .

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 9d06964. 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:


Untracked files:
    Untracked:  Figs/
    Untracked:  analysis/.DS_Store
    Untracked:  analysis/Fig1.Rmd
    Untracked:  analysis/Fig1_pcesd.Rmd
    Untracked:  analysis/Fig1b.Rmd
    Untracked:  analysis/Fig2.Rmd
    Untracked:  analysis/Figure3.Rmd
    Untracked:  analysis/Figure4.Rmd
    Untracked:  analysis/GenerationofRawFiles/
    Untracked:  analysis/Supplemental Analyses/
    Untracked:  analysis/density.Rmd
    Untracked:  code/utils.R
    Untracked:  data/amit_df.rds
    Untracked:  data/amit_df_with_pc_correction.rds
    Untracked:  data/baseline_withPCS.rds
    Untracked:  data/fh_full.rds
    Untracked:  data/fh_prs.rds
    Untracked:  data/fhs_prs_with_pc_corrrection.rds
    Untracked:  data/followupdates.rds
    Untracked:  data/genotype_data_nodup.eigenvec
    Untracked:  docs/Figure2.html
    Untracked:  docs/Figure3.html
    Untracked:  docs/Figure4.html
    Untracked:  docs/Sex_analyses.html
    Untracked:  docs/figure/
    Untracked:  docs/site_libs/crosstalk-1.2.1/
    Untracked:  docs/site_libs/htmltools-fill-0.5.8.1/
    Untracked:  docs/site_libs/htmlwidgets-1.6.4/
    Untracked:  docs/site_libs/jqueryui-1.13.2/
    Untracked:  docs/site_libs/plotly-binding-4.10.4/
    Untracked:  docs/site_libs/plotly-htmlwidgets-css-2.11.1/
    Untracked:  docs/site_libs/plotly-main-2.11.1/
    Untracked:  docs/site_libs/tocify-1.9.1/
    Untracked:  docs/site_libs/typedarray-0.1/
    Untracked:  output/amit_df_with_pc_correction.rds
    Untracked:  output/fhs_prs_with_pc_corrrection
    Untracked:  output/fhs_prs_with_pc_corrrection.rds
    Untracked:  output/h1hs_withPC.rds
    Untracked:  output/hall_withPC.rds
    Untracked:  output/hallpce.rds
    Untracked:  output/hazards_fh_EQ_withPC_corrections.rds
    Untracked:  output/hazards_fh_EQ_withPC_corrections_sex0.rds
    Untracked:  output/hazards_fh_EQ_withPC_corrections_sex1.rds
    Untracked:  output/hazards_rate_UKB_amit_EQ_withPCcorrection.rds
    Untracked:  output/hazards_rate_lowerbound_amit_EQ_withPCcorrection.rds
    Untracked:  output/hazards_rate_lowerbound_fh_EQ_withPC_corrections.rds
    Untracked:  output/hazards_rate_lowerbound_fh_EQ_withPC_corrections_sex0.rds
    Untracked:  output/hazards_rate_lowerbound_fh_EQ_withPC_corrections_sex1.rds
    Untracked:  output/hazards_rate_upperbound_amit_EQ_withPCcorrection.rds
    Untracked:  output/hazards_rate_upperbound_fh_EQ_withPC_corrections.rds
    Untracked:  output/hazards_rate_upperbound_fh_EQ_withPC_corrections_sex0.rds
    Untracked:  output/hazards_rate_upperbound_fh_EQ_withPC_corrections_sex1.rds
    Untracked:  output/hrindex_fhs_eq_with_pc.csv
    Untracked:  output/hrindex_ukb_eq.csv
    Untracked:  output/r2_withPC.rds
    Untracked:  output/r2fhs_withPC.rds
    Untracked:  output/r2index_fhs_eq_with_pc.csv
    Untracked:  output/r2index_ukb_eq.csv
    Untracked:  output/r2pce.rds
    Untracked:  output/zph_all.rds
    Untracked:  output/zph_amit_EQ.rds

Unstaged changes:
    Modified:   .DS_Store
    Modified:   analysis/about.Rmd
    Modified:   docs/about.html

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.


There are no past versions. Publish this analysis with wflow_publish() to start tracking its development.


Introduction

Now show non-proptional

<ggproto object: Class ScaleDiscrete, Scale, gg>
    aesthetics: colour
    axis_order: function
    break_info: function
    break_positions: function
    breaks: Diabetes mellitus Male Sex Smoking Polygenic score LDL C ...
    call: call
    clone: function
    dimension: function
    drop: TRUE
    expand: waiver
    get_breaks: function
    get_breaks_minor: function
    get_labels: function
    get_limits: function
    get_transformation: function
    guide: legend
    is_discrete: function
    is_empty: function
    labels: waiver
    limits: NULL
    make_sec_title: function
    make_title: function
    map: function
    map_df: function
    n.breaks.cache: NULL
    na.translate: TRUE
    na.value: grey50
    name: waiver
    palette: function
    palette.cache: NULL
    position: left
    range: environment
    rescale: function
    reset: function
    train: function
    train_df: function
    transform: function
    transform_df: function
    super:  <ggproto object: Class ScaleDiscrete, Scale, gg>

R version 4.4.0 (2024-04-24)
Platform: aarch64-apple-darwin20
Running under: macOS Sonoma 14.5

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRblas.0.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0

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

time zone: America/New_York
tzcode source: internal

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

other attached packages:
 [1] babynames_1.0.1    gapminder_1.0.0    carData_3.0-5      plotly_4.10.4     
 [5] DT_0.33            gt_0.10.1          RColorBrewer_1.1-3 data.table_1.15.4 
 [9] pROC_1.18.5        rsq_2.6            survMisc_0.5.6     gridExtra_2.3     
[13] ggfortify_0.4.17   reshape_0.8.9      eulerr_7.0.2       survminer_0.4.9   
[17] ggpubr_0.6.0       survival_3.5-8     lubridate_1.9.3    forcats_1.0.0     
[21] stringr_1.5.1      purrr_1.0.2        readr_2.1.5        tidyr_1.3.1       
[25] tibble_3.2.1       tidyverse_2.0.0    ggsci_3.1.0        dplyr_1.1.4       
[29] ggplot2_3.5.1      reshape2_1.4.4    

loaded via a namespace (and not attached):
 [1] rlang_1.1.4       magrittr_2.0.3    git2r_0.33.0      deming_1.4       
 [5] compiler_4.4.0    systemfonts_1.1.0 vctrs_0.6.5       pkgconfig_2.0.3  
 [9] fastmap_1.2.0     backports_1.5.0   labeling_0.4.3    KMsurv_0.1-5     
[13] utf8_1.2.4        promises_1.3.0    rmarkdown_2.26    tzdb_0.4.0       
[17] nloptr_2.0.3      ragg_1.3.2        xfun_0.44         cachem_1.1.0     
[21] jsonlite_1.8.8    highr_0.10        later_1.3.2       Deriv_4.1.3      
[25] broom_1.0.6       R6_2.5.1          bslib_0.7.0       stringi_1.8.4    
[29] car_3.1-2         boot_1.3-30       jquerylib_0.1.4   Rcpp_1.0.12      
[33] knitr_1.46        zoo_1.8-12        httpuv_1.6.15     Matrix_1.7-0     
[37] splines_4.4.0     timechange_0.3.0  tidyselect_1.2.1  rstudioapi_0.16.0
[41] abind_1.4-5       yaml_2.3.8        lattice_0.22-6    plyr_1.8.9       
[45] withr_3.0.0       evaluate_0.23     xml2_1.3.6        pillar_1.9.0     
[49] generics_0.1.3    rprojroot_2.0.4   hms_1.1.3         munsell_0.5.1    
[53] scales_1.3.0      minqa_1.2.7       xtable_1.8-4      glue_1.7.0       
[57] lazyeval_0.2.2    tools_4.4.0       lme4_1.1-35.3     ggsignif_0.6.4   
[61] fs_1.6.4          grid_4.4.0        colorspace_2.1-0  nlme_3.1-164     
[65] cli_3.6.2         km.ci_0.5-6       textshaping_0.3.7 workflowr_1.7.1  
[69] fansi_1.0.6       viridisLite_0.4.2 gtable_0.3.5      rstatix_0.7.2    
[73] sass_0.4.9        digest_0.6.35     htmlwidgets_1.6.4 farver_2.1.2     
[77] htmltools_0.5.8.1 lifecycle_1.0.4   httr_1.4.7        MASS_7.3-60.2