From e640ddadafd0a86f2b2a4ff6e1418b40bf70efb8 Mon Sep 17 00:00:00 2001 From: Ebie Dambo Date: Wed, 5 Jun 2024 13:17:11 -0500 Subject: [PATCH 1/3] Code to inject arbitrary summary tables into the codebook If this commit is accepted, files for modifying the codebookr package to allow for the injection of arbitrary summary statistics will be created. --- .../1/s/c05vsgsjeetha/00000f.csv | 7 - .../1/s/c0yswsfciymt1/00000f.csv | 26 -- .../1/s/c1vjzynphpouz/00000f.csv | 1 - .../1/s/c3xs7awex8c96/00000f.csv | 22 -- .../1/s/c4ys1zykv84zs/00000f.csv | 1 - .../1/s/c5j4cj1d6h4fn/00000f.csv | 1 - .../1/s/c5lkhfys19zhb/00000f.csv | 39 --- .../1/s/c5lwfbhkyscks/00000f.csv | 1 - .../1/s/c62qty2tdap88/00000f.csv | 7 - .../1/s/c7un1gfify09i/00000f.csv | 9 - .../1/s/c81xp8u6qkx0s/00000f.csv | 1 - .../1/s/c8gyssxaibaxd/00000f.csv | 17 -- .../1/s/c99s4pgb0u0bv/00000f.csv | 1 - .../1/s/c9bz8t8xn83ld/000011.csv | 5 - .../1/s/cb27j2lesd65y/00000f.csv | 2 - .../1/s/cbvjplhy7jk0p/00000f.csv | 68 ----- .../1/s/ce27lx9w91hu6/00000f.csv | 1 - .../1/s/cgfcy2ty8h1w9/00000f.csv | 1 - .../notebooks/19D3CF1A-README/1/s/chunks.json | 1 - .../1/s/chwix01h46w6z/00000f.csv | 8 - .../1/s/cjz4ieuexoxz5/00000f.csv | 1 - .../1/s/cl8xydwb9kgmh/00000f.csv | 7 - .../1/s/clegrvw8b73hi/00000f.csv | 1 - .../1/s/coktz8j1ax7ez/00000f.csv | 1 - .../1/s/cqenx2m2b8qix/00000f.csv | 25 -- .../1/s/cqg3c8cszvq9o/00000f.csv | 22 -- .../1/s/cr1z52xcmfewa/00000f.csv | 1 - .../1/s/crgltl84sy4fz/00000f.csv | 1 - .../1/s/cs4oh80233rdu/00000f.csv | 67 ----- .../1/s/csnuixqhrh2ve/00000f.csv | 2 - .../1/s/ctcrzlg9ec52m/00000f.csv | 3 - .../1/s/cv63qyqu0ql3w/00000f.csv | 4 - .../1/s/cvjj8okp10rl8/00000f.csv | 1 - .../1/s/cvubqyl0dsdd6/00000f.csv | 2 - .../1/s/cyonc8ut9eh7p/00000f.csv | 2 - R/cb_custom_summary_stats_to_ft.R | 32 +++ R/cb_inject_custom_summary_table.R | 268 ++++++++++++++++++ 37 files changed, 300 insertions(+), 359 deletions(-) delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c05vsgsjeetha/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c0yswsfciymt1/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c1vjzynphpouz/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c3xs7awex8c96/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c4ys1zykv84zs/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c5j4cj1d6h4fn/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c5lkhfys19zhb/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c5lwfbhkyscks/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c62qty2tdap88/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c7un1gfify09i/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c81xp8u6qkx0s/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c8gyssxaibaxd/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c99s4pgb0u0bv/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c9bz8t8xn83ld/000011.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/cb27j2lesd65y/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/cbvjplhy7jk0p/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/ce27lx9w91hu6/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/cgfcy2ty8h1w9/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/chunks.json delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/chwix01h46w6z/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/cjz4ieuexoxz5/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/cl8xydwb9kgmh/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/clegrvw8b73hi/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/coktz8j1ax7ez/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/cqenx2m2b8qix/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/cqg3c8cszvq9o/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/cr1z52xcmfewa/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/crgltl84sy4fz/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/cs4oh80233rdu/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/csnuixqhrh2ve/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/ctcrzlg9ec52m/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/cv63qyqu0ql3w/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/cvjj8okp10rl8/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/cvubqyl0dsdd6/00000f.csv delete mode 100644 .Rproj.user/shared/notebooks/19D3CF1A-README/1/s/cyonc8ut9eh7p/00000f.csv create mode 100644 R/cb_custom_summary_stats_to_ft.R create mode 100644 R/cb_inject_custom_summary_table.R diff --git a/.Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c05vsgsjeetha/00000f.csv b/.Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c05vsgsjeetha/00000f.csv deleted file mode 100644 index f9f1257..0000000 --- a/.Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c05vsgsjeetha/00000f.csv +++ /dev/null @@ -1,7 +0,0 @@ -"0","admin_vars <- study %>% " -"0"," select(id, date, time) %>% " -"0"," names()" -"0","" -"0","for(i in admin_vars) {" -"0"," attr(study[[i]], ""source"") <- ""Administrative data""" -"0","}" diff --git a/.Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c0yswsfciymt1/00000f.csv b/.Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c0yswsfciymt1/00000f.csv deleted file mode 100644 index 0144298..0000000 --- a/.Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c0yswsfciymt1/00000f.csv +++ /dev/null @@ -1,26 +0,0 @@ -"0","attributes(study$time)" -"1","$units -" -"1","[1]" -"1"," ""secs""" -"1"," -" -"1"," -" -"1","$class -" -"1","[1]" -"1"," ""hms"" " -"1"," ""difftime""" -"1"," -" -"1"," -" -"1","$source -" -"1","[1]" -"1"," ""Administrative data""" -"1"," -" -"1"," -" diff --git a/.Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c1vjzynphpouz/00000f.csv b/.Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c1vjzynphpouz/00000f.csv deleted file mode 100644 index ebcea7a..0000000 --- a/.Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c1vjzynphpouz/00000f.csv +++ /dev/null @@ -1 +0,0 @@ -"0","print(codebook(study), ""stata_codebook_1.docx"")" diff --git a/.Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c3xs7awex8c96/00000f.csv b/.Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c3xs7awex8c96/00000f.csv deleted file mode 100644 index 56425f6..0000000 --- a/.Rproj.user/shared/notebooks/19D3CF1A-README/1/s/c3xs7awex8c96/00000f.csv +++ /dev/null @@ -1,22 +0,0 @@ -"0","glimpse(study)" -"1","Rows: 20" -"1","" -"1"," -" -"1","Columns: 10" -"1","" -"1"," -" -"1","$ id  ""1001"", ""1002"", NA, ""1004"", ""1005"", ""1006"", ""1007"", ""1008"", ""1009"", ""1010"", ""1011"", ""1012"", ""1013"", ""1014"", ""1015"", ""1… -$ address  ""101 A st."", ""101 B st."", ""101 C st."", ""101 D st."", ""101 E st."", ""101 F st."", ""101 G st."", ""101 H st."", ""101 I st."", ""… -$ sex  Female, Female, Female, NA, Female, Male, Male, Male, Female, Female, Male, Male, Male, Female, Male, Female, Male, Fe… -$ date  2021-10-12, 2021-09-23, 2021-10-13, 2021-10-19, NA, 2021-10-10, 2021-09-21, 2021-10-26, 2021-09-23, 2021-10-03, 2021-… -$ time