From b64b582e8cbb54e851f00be06ab44fd7811286f1 Mon Sep 17 00:00:00 2001 From: Mike Vink Date: Fri, 23 Apr 2021 09:51:56 +0200 Subject: new --- scripts/.Rhistory | 0 scripts/char_clinical_studies_table.R | 18 ++++++++++++++++++ scripts/demographics.R | 3 +++ 3 files changed, 21 insertions(+) create mode 100644 scripts/.Rhistory create mode 100644 scripts/char_clinical_studies_table.R create mode 100644 scripts/demographics.R (limited to 'scripts') diff --git a/scripts/.Rhistory b/scripts/.Rhistory new file mode 100644 index 0000000..e69de29 diff --git a/scripts/char_clinical_studies_table.R b/scripts/char_clinical_studies_table.R new file mode 100644 index 0000000..8b51949 --- /dev/null +++ b/scripts/char_clinical_studies_table.R @@ -0,0 +1,18 @@ +library(tidyverse) +library(knitr) + +tbl <- read_csv("../csv/char_clinical_studies.csv") +tbl <- tbl %>% + select(-1, -3, -8, -9) %>% + mutate(across(everything(), function(x) { + rep <- str_replace_all(x, "â\u0080\u00934", "-") + rep <- str_replace_all(rep, "â\u0080\u0093", "-") + rep <- str_replace_all(rep, "â\u0080\u0089", " ") + rep <- str_replace_all(rep, "â\u0089¥", ">=") + return(rep) + })) %>% + kable(format = "latex", booktabs = TRUE) + +clip <- pipe("xclip -selection clipboard", "w") +write(tbl, file=clip) +close(clip) diff --git a/scripts/demographics.R b/scripts/demographics.R new file mode 100644 index 0000000..5cc2fca --- /dev/null +++ b/scripts/demographics.R @@ -0,0 +1,3 @@ +library(ggplot2) + + -- cgit v1.2.3