Skip to content

Commit 2023d4f

Browse files
authored
Initial commit
0 parents  commit 2023d4f

File tree

131 files changed

+146736
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+146736
-0
lines changed

.Rbuildignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
^renv$
2+
^renv\.lock$
3+
^.*\.Rproj$
4+
^\.Rproj\.user$
5+
^LICENSE\.md$
6+
^CONTRIBUTING\.md$
7+
^docs$
8+
^images$
9+
^\.github$
10+
^\.lintr$
11+
^outputs$
12+
^rmarkdown$
13+
^CITATION\.cff$
14+
^run_rmarkdown\.sh$
15+
^inputs$
16+
^mock_paper\.md$

.Rprofile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source("renv/activate.R")

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/R-CMD-check.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
4+
on:
5+
push:
6+
branches: [main]
7+
workflow_dispatch:
8+
inputs:
9+
os_choice:
10+
description: 'Operating system to run on'
11+
required: true
12+
default: 'all'
13+
type: choice
14+
options:
15+
- all
16+
- ubuntu
17+
- macos
18+
- windows
19+
20+
name: R-CMD-check.yaml
21+
22+
permissions: read-all
23+
24+
jobs:
25+
setup-matrix:
26+
runs-on: ubuntu-latest
27+
outputs:
28+
matrix: ${{ steps.setup-matrix.outputs.matrix }}
29+
steps:
30+
- id: setup-matrix
31+
run: |
32+
if [[ "${{ github.event_name }}" == "push" || "${{ github.event.inputs.os_choice }}" == "all" ]]; then
33+
echo 'matrix={"config":[{"os":"macos-latest","r":"release"},{"os":"windows-latest","r":"release"},{"os":"ubuntu-latest","r":"release"}]}' >> $GITHUB_OUTPUT
34+
elif [[ "${{ github.event.inputs.os_choice }}" == "ubuntu" ]]; then
35+
echo 'matrix={"config":[{"os":"ubuntu-latest","r":"release"}]}' >> $GITHUB_OUTPUT
36+
elif [[ "${{ github.event.inputs.os_choice }}" == "macos" ]]; then
37+
echo 'matrix={"config":[{"os":"macos-latest","r":"release"}]}' >> $GITHUB_OUTPUT
38+
elif [[ "${{ github.event.inputs.os_choice }}" == "windows" ]]; then
39+
echo 'matrix={"config":[{"os":"windows-latest","r":"release"}]}' >> $GITHUB_OUTPUT
40+
fi
41+
42+
R-CMD-check:
43+
needs: setup-matrix
44+
runs-on: ${{ matrix.config.os }}
45+
46+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
47+
48+
strategy:
49+
fail-fast: false
50+
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
51+
52+
env:
53+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
54+
R_KEEP_PKG_SOURCE: yes
55+
56+
steps:
57+
- uses: actions/checkout@v4
58+
59+
- uses: r-lib/actions/setup-pandoc@v2
60+
61+
- uses: r-lib/actions/setup-r@v2
62+
with:
63+
r-version: ${{ matrix.config.r }}
64+
http-user-agent: ${{ matrix.config.http-user-agent }}
65+
use-public-rspm: true
66+
67+
- uses: r-lib/actions/setup-r-dependencies@v2
68+
with:
69+
extra-packages: any::rcmdcheck
70+
needs: check
71+
72+
- uses: r-lib/actions/check-r-package@v2
73+
with:
74+
upload-snapshots: true
75+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/lint.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This file will lint the specified files/directories.
2+
# Workflow adapted from https://github.com/r-lib/actions/tree/v2/examples
3+
4+
on:
5+
push:
6+
branches: [main]
7+
workflow_dispatch:
8+
9+
name: lint
10+
11+
permissions: read-all
12+
13+
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
env:
17+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: r-lib/actions/setup-r@v2
22+
with:
23+
use-public-rspm: true
24+
25+
- uses: r-lib/actions/setup-r-dependencies@v2
26+
with:
27+
extra-packages: any::lintr, any::cyclocomp, local::.
28+
needs: lint
29+
30+
- name: Lint package
31+
run: lintr::lint_package()
32+
shell: Rscript {0}
33+
env:
34+
LINTR_ERROR_ON_LINT: true
35+
36+
- name: Lint rmarkdown
37+
run: lintr::lint_dir("rmarkdown")
38+
shell: Rscript {0}
39+
env:
40+
LINTR_ERROR_ON_LINT: true

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# History files
2+
.Rhistory
3+
.Rapp.history
4+
5+
# Session Data files
6+
.RData
7+
.RDataTmp
8+
9+
# User-specific files
10+
.Ruserdata
11+
12+
# Example code in package build process
13+
*-Ex.R
14+
15+
# Output files from R CMD build
16+
/*.tar.gz
17+
18+
# Output files from R CMD check
19+
/*.Rcheck/
20+
21+
# RStudio files
22+
.Rproj.user/
23+
24+
# produced vignettes
25+
vignettes/*.html
26+
vignettes/*.pdf
27+
28+
# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
29+
.httr-oauth
30+
31+
# knitr and R markdown default cache directories
32+
*_cache/
33+
/cache/
34+
35+
# Temporary files created by R markdown
36+
*.utf8.md
37+
*.knit.md
38+
39+
# R Environment Variables
40+
.Renviron
41+
42+
# pkgdown site
43+
docs/
44+
45+
# translation temp files
46+
po/*~
47+
48+
# RStudio Connect folder
49+
rsconnect/

.lintr

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
linters: all_linters(packages = "lintr")
2+
encoding: "UTF-8"
3+
exclusions: list("renv", "packrat", "tests/testthat.R")

CITATION.cff

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This CITATION.cff file was generated with cffinit.
2+
# Visit https://bit.ly/cffinit to generate yours today!
3+
4+
cff-version: 1.2.0
5+
title: >-
6+
R DES RAP Template
7+
message: >-
8+
If you use this software, please cite it using the
9+
metadata from this file.
10+
type: software
11+
authors:
12+
- given-names: Amy
13+
family-names: Heather
14+
email: a.heather2@exeter.ac.uk
15+
affiliation: University of Exeter
16+
orcid: 'https://orcid.org/0000-0002-6596-3479'
17+
repository-code: >-
18+
https://github.com/pythonhealthdatascience/rdesrap_mms
19+
abstract: >-
20+
A template for creating discrete-event simulation (DES) models in R
21+
within a reproducible analytical pipeline (RAP).
22+
version: 0.4.0
23+
date-released: '2025-06-04'

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Contributing
2+
3+
🎉 Thank you for checking out our project! 🎉
4+
5+
This file contains guidelines on how to get in touch with us and potentially contribute towards this repository.
6+
7+
## Email
8+
9+
You can contact the researchers on this project using the provided email addresses in `CITATION.cff`.
10+
11+
## Suggesting changes
12+
13+
If you spot an issue, you are welcome to raise this either by:
14+
15+
* Using **GitHub Issues**.
16+
* **Forking** the repository, make your changes and submit a pull request for review.

DESCRIPTION

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Package: simulation
2+
Type: Package
3+
Title: Simulation
4+
Version: 0.1.0
5+
Authors@R: c(
6+
person(
7+
"Amy", "Heather",
8+
email = "a.heather2@exeter.ac.uk",
9+
role = c("aut", "cre")
10+
)
11+
)
12+
URL: https://github.com/pythonhealthdatascience/rdesrap_mms
13+
Description: Template reproducible analytical pipeline (RAP) for simple R
14+
discrete-event simulation (DES) model.
15+
License: MIT + file LICENSE
16+
Encoding: UTF-8
17+
LazyData: true
18+
RoxygenNote: 7.3.2
19+
Imports:
20+
simmer,
21+
magrittr,
22+
dplyr,
23+
purrr,
24+
rlang,
25+
tidyr,
26+
tidyselect,
27+
future,
28+
future.apply,
29+
ggplot2,
30+
tibble,
31+
gridExtra,
32+
R6
33+
Suggests:
34+
testthat (>= 3.0.0),
35+
patrick,
36+
lintr,
37+
devtools,
38+
xtable,
39+
data.table,
40+
mockery,
41+
fitdistrplus,
42+
lubridate,
43+
plotly
44+
Config/testthat/edition: 3

0 commit comments

Comments
 (0)