You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-7Lines changed: 38 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,16 +56,43 @@ renv::snapshot()
56
56
57
57
The simulation code is in the `R/` folder as a local package. There are files executing the model and analysing the results in `rmarkdown/`.
58
58
59
-
To run the model with base parameters once or with replications:
59
+
**Install the local package:**
60
60
61
61
```{.r}
62
-
# TODO
62
+
devtools::install()
63
+
library(simulation)
63
64
```
64
65
65
-
Example altering the model parameters:
66
+
**Run a single simulation:**
66
67
67
68
```{.r}
68
-
# TODO
69
+
param <- create_parameters(number_of_runs = 1L)
70
+
single_results <- runner(param = param)
71
+
```
72
+
73
+
**Run multiple replications:**
74
+
75
+
```{.r}
76
+
param <- create_parameters(number_of_runs = 5L)
77
+
single_results <- runner(param = param)
78
+
```
79
+
80
+
**Run all analyses (from command line):**
81
+
82
+
```{.r}
83
+
bash run_rmarkdown.sh
84
+
```
85
+
86
+
**Run tests:**
87
+
88
+
```{.r}
89
+
devtools::test()
90
+
```
91
+
92
+
**Lint code:**
93
+
94
+
```{.r}
95
+
lintr::lint_dir()
69
96
```
70
97
71
98
### Generating the results from the article
@@ -87,23 +114,27 @@ To generate these, simply execute `rmarkdown/analysis.Rmd`.
87
114
88
115
Original:
89
116
117
+

118
+
90
119
From this repository:
91
120
92
-
**TODO**
121
+

93
122
94
123
**Figure 3**
95
124
96
125
Original:
97
126
127
+

128
+
98
129
From this repository:
99
130
100
-
**TODO**
131
+

101
132
102
133
<br>
103
134
104
135
## Run time and machine specification
105
136
106
-
The run time for this analysis (`notebooks/analysis.Rm`) is **TODO** seconds. This was on an Intel Core i7-12700H, 32GB RAM, Ubuntu 24.04.1.
137
+
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.
107
138
108
139
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.
0 commit comments