forked from ghurault/EczemaPredPOSCORAD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview_reports.Rmd
49 lines (41 loc) · 1.63 KB
/
view_reports.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
title: "Analysis reports"
author: "Guillem Hurault"
date: "`r format(Sys.time(), '%d %B %Y')`"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
source(here::here("analysis", "00_init.R"))
```
You should open this file in the browser rather than in RStudio viewer, otherwise the relative paths may not work.
# Fit
```{r fit-table, results='asis', echo=FALSE, message=FALSE}
intensity_signs <- detail_POSCORAD("Intensity signs")$Name
available_models() %>%
expand_grid(Dataset = c("Derexyl", "PFDC", "Fake")) %>%
mutate(Model = factor(Model, levels = unique(Model))) %>%
arrange(Model) %>%
mutate(Link = file.path("..", "docs", paste0("fit_", Score, "_", Model, "_", Dataset, ".html")),
File = paste0("[", Dataset, "](", Link, ")")) %>%
filter(file.exists(Link)) %>%
select(-Link) %>%
group_by(Model, Score) %>%
summarise(File = paste0(File, collapse = " - ")) %>%
pivot_wider(names_from = "Model", values_from = "File") %>%
mutate(across(everything(), ~replace_na(.x, ""))) %>%
mutate(Score = factor(Score, levels = c("extent", intensity_signs, "itching", "sleep", "B", "C", "oSCORAD", "SCORAD"))) %>%
arrange(Score) %>%
knitr::kable()
```
# Validation
```{r validation-table, results='asis', echo=FALSE}
expand_grid(Score = detail_POSCORAD()$Name,
Dataset = c("Derexyl", "PFDC", "Fake")) %>%
mutate(Link = file.path("..", "docs", paste0("perf4_", Score, "_", Dataset, ".html")),
File = paste0("[link](", Link, ")")) %>%
filter(file.exists(Link)) %>%
select(-Link) %>%
pivot_wider(names_from = "Dataset", values_from = "File") %>%
knitr::kable()
```