summaryrefslogtreecommitdiff
path: root/scripts/char_clinical_studies_table.R
blob: 8b51949ffabec13f6777c214a17ade80086750a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)