Skip to content

Commit 1bebc20

Browse files
authored
Merge pull request #196 from HorridTom/workflow-check-full
Add full check workflow
2 parents 0b7a5c9 + df37528 commit 1bebc20

12 files changed

Lines changed: 198 additions & 2 deletions

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

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
8+
name: R-CMD-check.yaml
9+
10+
permissions: read-all
11+
12+
jobs:
13+
R-CMD-check:
14+
runs-on: ${{ matrix.config.os }}
15+
16+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
config:
22+
- {os: macos-latest, r: 'release'}
23+
- {os: windows-latest, r: 'release'}
24+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
25+
- {os: ubuntu-latest, r: 'release'}
26+
- {os: ubuntu-latest, r: 'oldrel-1'}
27+
28+
env:
29+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
30+
R_KEEP_PKG_SOURCE: yes
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- uses: r-lib/actions/setup-pandoc@v2
36+
37+
- uses: r-lib/actions/setup-r@v2
38+
with:
39+
r-version: ${{ matrix.config.r }}
40+
http-user-agent: ${{ matrix.config.http-user-agent }}
41+
use-public-rspm: true
42+
43+
- uses: r-lib/actions/setup-r-dependencies@v2
44+
with:
45+
extra-packages: any::rcmdcheck
46+
needs: check
47+
48+
- uses: r-lib/actions/check-r-package@v2
49+
with:
50+
upload-snapshots: true
51+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

R/data.R

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,59 @@
1111
#' \item{Within_4h}{Total attendances that were < 4 hours}
1212
#' \item{Over_4h}{Total attendances that were > 4 hours}
1313
#' \item{Percent_in_4h}{Percentage of attendances within 4 hours}
14-
#' \item{E_Adm_ViaAE}{Total emergency admissions via emergency department}
14+
#' \item{E_Adm_Via_ED}{Total emergency admissions via emergency department}
1515
#' \item{E_Adm_Over_4h}{Total > 4 hours from decision to admit to admission}
1616
#' }
1717
#'
1818
#' @source <https://www.england.nhs.uk/statistics/statistical-work-areas/ae-waiting-times-and-activity/ae-attendances-and-emergency-admissions-2023-24/>
1919
#'
2020
"ed_attendances_monthly"
21+
22+
#' Example Time Series 1
23+
#'
24+
#' A simulated example time series used in illustrating features of the Stable
25+
#' Shift Algorithm.
26+
#'
27+
#' @format
28+
#' A data frame with 125 rows and 2 columns
29+
#' \describe{
30+
#' \item{x}{Consecutive integer time}
31+
#' \item{y}{Numeric time series}
32+
#' }
33+
#'
34+
#' @source Simulated data
35+
#'
36+
"example_series_1"
37+
38+
#' Example Time Series 2a
39+
#'
40+
#' A second simulated example time series used in illustrating features of the
41+
#' Stable Shift Algorithm.
42+
#'
43+
#' @format
44+
#' A data frame with 43 rows and 2 columns
45+
#' \describe{
46+
#' \item{x}{Consecutive integer time}
47+
#' \item{y}{Integer time series}
48+
#' }
49+
#'
50+
#' @source Simulated data
51+
#'
52+
"example_series_2a"
53+
54+
#' Example Time Series 2b
55+
#'
56+
#' A third simulated example time series used in illustrating features of the
57+
#' Stable Shift Algorithm. Identical to example_series_2a except at seven time
58+
#' points, all occurring at or after x = 27.
59+
#'
60+
#' @format
61+
#' A data frame with 43 rows and 2 columns
62+
#' \describe{
63+
#' \item{x}{Consecutive integer time}
64+
#' \item{y}{Integer time series}
65+
#' }
66+
#'
67+
#' @source Simulated data
68+
#'
69+
"example_series_2b"

R/plot_code.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#' "XMR", "MR", "C", "C'", "P", "P'".
3333
#'
3434
#' ## Algorithm Parameters
35+
#' Parameters that control behaviour of the algorithm used to re-establish
36+
#' control limits.
3537
#' @param periodMin The minimum number of points (subgroups) per period,
3638
#' i.e. the minimum number of points required to form control limits.
3739
#' @param baseline Integer, overrides periodMin for the first calculation period
@@ -51,6 +53,8 @@
5153
#' calculation period. Set to FALSE only with noRegrets = FALSE.
5254
#'
5355
#' ## SPC Parameters
56+
#' Parameters that control how cetnre line and control limits are established
57+
#' for each period, and details of how SPC rules are applied
5458
#' @param maxNoOfExclusions The maximum number of extreme points to exclude from
5559
#' limit calculations.
5660
#' @param highlightExclusions Boolean signifying whether excluded points are
@@ -73,6 +77,7 @@
7377
#' floating median, if present.
7478

7579
#' ## Output Type
80+
#' Arguments that control how the result is outputted
7681
#' @param plotChart Boolean specifying whether to plot the chart. If not, the
7782
#' data is returned with centre line, control limits and other analytic output
7883
#' appended as columns.
@@ -90,6 +95,7 @@
9095
#' log data is saved to. Full log data is saved, regardless of verbosity.
9196
#'
9297
#' ## Chart Appearance
98+
#' Arguments that control aspects of chart visualisation
9399
#' @param title Optional string specifying chart title. Overrides df$title.
94100
#' @param subtitle Optional string specifying subtitle. Overrides df$subtitle.
95101
#' @param use_caption Boolean controlling whether the caption is displayed.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<!-- badges: start -->
44
[![Codecov test coverage](https://codecov.io/gh/HorridTom/autospc/graph/badge.svg)](https://app.codecov.io/gh/HorridTom/autospc)
5+
[![R-CMD-check](https://github.com/HorridTom/autospc/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/HorridTom/autospc/actions/workflows/R-CMD-check.yaml)
56
<!-- badges: end -->
67

78
## Overview

data/example_series_1.rda

-47 Bytes
Binary file not shown.

flow charts spc algorithm.pptx

-283 KB
Binary file not shown.

man/create_SPC_auto_limits_table.Rd

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/ed_attendances_monthly.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/example_series_1.Rd

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/example_series_2a.Rd

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)