Skip to content

Commit 46ff5b2

Browse files
committed
feat(rmarkdown): re-ran and updated times in README + updated README bash description
1 parent 5d933eb commit 46ff5b2

5 files changed

Lines changed: 207 additions & 170 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ param <- create_parameters(number_of_runs = 5L)
8787
single_results <- runner(param = param)
8888
```
8989

90-
**Run all analyses (from command line):**
90+
**Run all analyses (from terminal - will not work from R console):**
9191

9292
```{.r}
9393
bash run_rmarkdown.sh
@@ -138,7 +138,7 @@ From this repository:
138138

139139
<details><summary><b>Run time and machine specification</b></summary>
140140

141-
The run time for this analysis (`notebooks/analysis.Rmd`) is **1m 38s** seconds. This was on an Intel Core i7-12700H, 32GB RAM, Ubuntu 24.04.1.
141+
The run time for this analysis (`notebooks/analysis.Rmd`) is **3m 40s** seconds. This was on an Intel Core i7-12700H, 32GB RAM, Ubuntu 24.04.1.
142142

143143
The other notebooks generate results for tests and illustrate other functionality (e.g. importing parameters from csv, running with logs), and these just take a second or two.
144144

@@ -180,4 +180,4 @@ Curious about contributing? Check out the [contributing guidelines](CONTRIBUTING
180180

181181
This project was developed as part of the project STARS: Sharing Tools and Artefacts for Reproducible Simulations. It is supported by the Medical Research Council [grant number [MR/Z503915/1](https://gtr.ukri.org/projects?ref=MR%2FZ503915%2F1)].
182182

183-
![](images/stars_banner.png)
183+
![](images/stars_banner.png)

outputs/log_example.log

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ dist_config=list(asu_arrival_stroke = list(class_name = "exponential", params =
1313
log_to_console=TRUE;
1414
log_to_file=TRUE;
1515
file_path=../outputs/log_example.log;
16-
verbose=TRUE;
1716
dist=list(arrival = list(asu = list(stroke = function (size = 1)
1817
rexp(size, rate = 1/mean), tia = function (size = 1)
1918
rexp(size, rate = 1/mean), neuro = function (size = 1)
@@ -22,17 +21,39 @@ rexp(size, rate = 1/mean)), rehab = list(stroke = function (size = 1)
2221
rexp(size, rate = 1/mean), neuro = function (size = 1)
2322
rexp(size, rate = 1/mean), other = function (size = 1)
2423
rexp(size, rate = 1/mean))), los = list(asu = list(stroke_noesd = function (size = 1)
25-
rlnorm(size, meanlog = meanlog, sdlog = sdlog), stroke_esd = function (size = 1)
26-
rlnorm(size, meanlog = meanlog, sdlog = sdlog), stroke_mortality = function (size = 1)
27-
rlnorm(size, meanlog = meanlog, sdlog = sdlog), tia = function (size = 1)
28-
rlnorm(size, meanlog = meanlog, sdlog = sdlog), neuro = function (size = 1)
29-
rlnorm(size, meanlog = meanlog, sdlog = sdlog), other = function (size = 1)
30-
rlnorm(size, meanlog = meanlog, sdlog = sdlog)), rehab = list(stroke_noesd = function (size = 1)
31-
rlnorm(size, meanlog = meanlog, sdlog = sdlog), stroke_esd = function (size = 1)
32-
rlnorm(size, meanlog = meanlog, sdlog = sdlog), tia = function (size = 1)
33-
rlnorm(size, meanlog = meanlog, sdlog = sdlog), neuro = function (size = 1)
34-
rlnorm(size, meanlog = meanlog, sdlog = sdlog), other = function (size = 1)
35-
rlnorm(size, meanlog = meanlog, sdlog = sdlog))), routing = list(asu = list(stroke = function (size = 1)
24+
{
25+
rlnorm(size, meanlog = params$meanlog, sdlog = params$sdlog)
26+
}, stroke_esd = function (size = 1)
27+
{
28+
rlnorm(size, meanlog = params$meanlog, sdlog = params$sdlog)
29+
}, stroke_mortality = function (size = 1)
30+
{
31+
rlnorm(size, meanlog = params$meanlog, sdlog = params$sdlog)
32+
}, tia = function (size = 1)
33+
{
34+
rlnorm(size, meanlog = params$meanlog, sdlog = params$sdlog)
35+
}, neuro = function (size = 1)
36+
{
37+
rlnorm(size, meanlog = params$meanlog, sdlog = params$sdlog)
38+
}, other = function (size = 1)
39+
{
40+
rlnorm(size, meanlog = params$meanlog, sdlog = params$sdlog)
41+
}), rehab = list(stroke_noesd = function (size = 1)
42+
{
43+
rlnorm(size, meanlog = params$meanlog, sdlog = params$sdlog)
44+
}, stroke_esd = function (size = 1)
45+
{
46+
rlnorm(size, meanlog = params$meanlog, sdlog = params$sdlog)
47+
}, tia = function (size = 1)
48+
{
49+
rlnorm(size, meanlog = params$meanlog, sdlog = params$sdlog)
50+
}, neuro = function (size = 1)
51+
{
52+
rlnorm(size, meanlog = params$meanlog, sdlog = params$sdlog)
53+
}, other = function (size = 1)
54+
{
55+
rlnorm(size, meanlog = params$meanlog, sdlog = params$sdlog)
56+
})), routing = list(asu = list(stroke = function (size = 1)
3657
{
3758
sample(values, size = size, replace = TRUE, prob = prob)
3859
}, tia = function (size = 1)

rmarkdown/analysis.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Analysis
22
================
33
Amy Heather
4-
2025-08-11
4+
2026-02-11
55

66
- [Set-up](#set-up)
77
- [Base case](#base-case)
@@ -65,18 +65,17 @@ parallel, you must use `devtools::install()` and then
6565
devtools::install(upgrade = "never")
6666
```
6767

68-
## ── R CMD build ─────────────────────────────────────────────────────────────────
69-
## checking for file ‘/home/amy/Documents/stars/rdesrap_stroke/DESCRIPTION’ ... ✔ checking for file ‘/home/amy/Documents/stars/rdesrap_stroke/DESCRIPTION’
68+
## ── R CMD build ────────────────────────────────────────────────────────────────────────────────────────────────
69+
## checking for file ‘/home/amy/Documents/stars/rdesrap_stroke/DESCRIPTION’ ... ✔ checking for file ‘/home/amy/Documents/stars/rdesrap_stroke/DESCRIPTION’ (355ms)
7070
## ─ preparing ‘simulation’:
7171
## checking DESCRIPTION meta-information ... ✔ checking DESCRIPTION meta-information
72-
## ─ checking for LF line-endings in source and make files and shell scripts
72+
## ─ checking for LF line-endings in source and make files and shell scripts (429ms)
7373
## ─ checking for empty or unneeded directories
74-
## Removed empty directory ‘simulation/tests/testthat/_snaps’
7574
## Omitted ‘LazyData’ from DESCRIPTION
76-
## ─ building ‘simulation_0.1.0.tar.gz’
75+
## ─ building ‘simulation_1.0.0.tar.gz’
7776
##
7877
## Running /opt/R/4.4.1/lib/R/bin/R CMD INSTALL \
79-
## /tmp/RtmpnXXY7B/simulation_0.1.0.tar.gz --install-tests
78+
## /tmp/RtmpT12vEN/simulation_1.0.0.tar.gz --install-tests
8079
## * installing to library ‘/home/amy/.cache/R/renv/library/rdesrap_stroke-34041c45/linux-ubuntu-noble/R-4.4/x86_64-pc-linux-gnu’
8180
## * installing *source* package ‘simulation’ ...
8281
## ** using staged installation
@@ -455,8 +454,7 @@ full_tab2 <- make_delay_table(
455454
## Warning: Use of .data in tidyselect expressions was deprecated in tidyselect 1.2.0.
456455
## ℹ Please use `all_of(var)` (or `any_of(var)`) instead of `.data[[var]]`
457456
## This warning is displayed once every 8 hours.
458-
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
459-
## generated.
457+
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.
460458

461459
``` r
462460
full_tab2
@@ -1071,4 +1069,4 @@ seconds <- as.integer(runtime %% 60L)
10711069
cat(sprintf("Notebook run time: %dm %ds", minutes, seconds))
10721070
```
10731071

1074-
## Notebook run time: 1m 31s
1072+
## Notebook run time: 3m 40s

rmarkdown/generate_exp_results.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Generate expected results
22
================
33
Amy Heather
4-
2025-08-11
4+
2026-02-11
55

66
- [Set-up](#set-up)
77
- [Base case](#base-case)
@@ -524,9 +524,6 @@ print(param)
524524
## $file_path
525525
## NULL
526526
##
527-
## $verbose
528-
## NULL
529-
##
530527
## $dist
531528
## NULL
532529

@@ -621,4 +618,4 @@ seconds <- as.integer(runtime %% 60L)
621618
cat(sprintf("Notebook run time: %dm %ds", minutes, seconds))
622619
```
623620

624-
## Notebook run time: 0m 1s
621+
## Notebook run time: 0m 3s

0 commit comments

Comments
 (0)