Skip to content

Commit

Permalink
corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-y committed Feb 12, 2024
1 parent c06dcdd commit dee45a7
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 30 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,11 @@ jobs:
config:
# Windows
- {os: windows-latest, r: 'release', allow_fail: false}
# Use 3.6 to trigger usage of RTools35
- {os: windows-latest, r: '3.6', allow_fail: true}
# Linux
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release', allow_fail: true}
- {os: ubuntu-latest, r: 'release', allow_fail: false}
- {os: ubuntu-latest, r: '4.1.2', allow_fail: false}
- {os: ubuntu-latest, r: '4.0.2', allow_fail: false}
- {os: ubuntu-latest, r: '3.6.1', allow_fail: true}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: phstemplates
Title: PHS R Templates
Version: 1.1.1
Version: 1.2.0
Authors@R: c(
person("Public Health Scotland", , , "[email protected]", role = "cph"),
person("Alan", "Yeung", , "[email protected]", role = c("aut", "cre"),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# phstemplates 1.2.0

* Updated official statistics and accredited official statistics (formerly national statistics) templates to 2024 versions.

# phstemplates 1.1.1

* Added three Management information templates for Word documents, accessible through RStudio menu: a Management Info Report, A Management Info Summary, and, a Management Info One Page template.
Expand Down
1 change: 0 additions & 1 deletion R/phs_report_docx.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ phs_report_docx <- function(toc = FALSE,
# Combine Cover and Report
cover_page %>%
officer::cursor_end() %>%
officer::body_remove() %>%
officer::body_add_break() %>%
officer::body_add_xml(str = xml_elt) %>%
officer::set_doc_properties(title = title) %>%
Expand Down
18 changes: 6 additions & 12 deletions inst/rmarkdown/templates/phs-accstats-report/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ output:
knitr::opts_chunk$set(echo = FALSE, dpi = 300)
library(ggplot2)
library(scales)
library(captioner)
library(flextable)
library(officer)
library(magrittr)
Expand Down Expand Up @@ -102,11 +101,6 @@ chart <- ggplot(data = chart_data,
axis.line = element_line(colour = "grey"),
axis.ticks = element_line(colour = "grey")
)
# Figure numbering using the captioner package
fig_nums <- captioner(prefix = "Figure", infix = ":")
fig_nums(name = "chart",
caption = "title ^1,2,\\*,\\ \\*\\*\\ +\\ footnote\\ reference^")
```

# Introduction
Expand All @@ -121,7 +115,7 @@ Praesent congue molestie nisi, ut congue dui mattis in. Vivamus vel urna risus.
# Main Points
<Div custom-style = "Bullet 1">In tristique lobortis sagittis. Phasellus mollis mattis iaculis. Vivamus nunc justo, finibus nec maximus vel, ultricies vel urna. Ut ac mi sit amet augue fringilla egestas et ut mauris. Morbi volutpat, felis vel egestas scelerisque, nunc purus auctor ligula, non lobortis nulla felis in tortor. In nec commodo sem.</Div>
<Div custom-style = "Bullet 2">Proin vitae vehicula purus. Cras consequat iaculis venenatis. Morbi vel risus vestibulum, aliquet mi in, volutpat massa. Sed urna sem, posuere eu semper vitae, ullamcorper quis leo. Mauris nisi metus, scelerisque sed urna eu, maximus porttitor ante. Sed scelerisque accumsan commodo. Sed interdum justo volutpat, sodales nisi sed, consectetur arcu. Interdum et malesuada fames ac ante ipsum primis in faucibus.</Div>
<Div custom-style = "Bullet 1">Praesent congue molestie nisi, ut congue dui mattis in. Vivamus vel urna risus. Donec sed blandit ex. Donec vel aliquam velit, in vestibulum lectus.</Div>
<Div custom-style = "Bullet 1">Praesent congue molestie nisi, ut congue dui mattis in. **Vivamus vel urna risus**. Donec sed blandit ex. Donec vel aliquam velit, in vestibulum lectus.</Div>

\newpage

Expand Down Expand Up @@ -186,7 +180,7 @@ flextable(table_data2, theme_fun = NULL) %>%

\newpage

<Div custom-style = "Table or chart caption">`r fig_nums("chart")`</Div>
<Div custom-style = "Table or chart caption">Figure 1: title ^1,2,\*,\ \*\*\ +\ footnote\ reference^</Div>
```{r chart, fig.width=7.18, fig.height=3.31, fig.cap="Appropriate ALT Text to be added."}
chart
```
Expand Down Expand Up @@ -354,23 +348,23 @@ DD Month YYYY

## Appendix 3 - Early access details

### Pre-Release Access
### Pre-release access

Under terms of the "Pre-Release Access to Official Statistics (Scotland) Order 2008", PHS is obliged to publish information on those receiving Pre-Release Access ("Pre-Release Access" refers to statistics in their final form prior to publication). The standard maximum Pre-Release Access is five working days. Shown below are details of those receiving standard Pre-Release Access.

### Standard Pre-Release Access
### Standard pre-release access

Scottish Government Department of Health and Social Care (DHSC)

NHS Board Chief Executives

NHS Board Communication leads

### Early Access for Management Information
### Early access for management information

These statistics will also have been made available to those who needed access to 'management information', i.e. as part of the delivery of health and care:

### Early Access for Quality Assurance
### Early access for quality assurance

These statistics will also have been made available to those who needed access to help quality assure the publication:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ For all media enquiries please email [[email protected]](mailto:[email protected]
# Further information
Our statistical practice is regulated by the Office for Statistics Regulation (OSR). These accredited official statistics were independently reviewed by the Office for Statistics Regulation in [month/year]. They comply with the standards of trustworthiness, quality and value in the Code of Practice for Statistics and should be labelled 'accredited official statistics'.

Accredited official statistics are called National Statistics in the Statistics and Registration Service Act 2007. Visit the UK Statistics Authority website for more information about the [Code of Practice and Accredited official statistics](https://code.statisticsauthority.gov.uk/).
Accredited official statistics are called National Statistics in the Statistics and Registration Service Act 2007. Visit the UK Statistics Authority website for more information about the [Code of Practice](https://code.statisticsauthority.gov.uk/) and [Accredited official statistics](https://code.statisticsauthority.gov.uk/glossary/#pid-accredited-official-statistics).

Visit our website for [further information about our statistics and PHS as an Official Statistics producer.](https://publichealthscotland.scot/our-organisation/about-our-statistics/official-statistics/)

Expand Down
18 changes: 6 additions & 12 deletions inst/rmarkdown/templates/phs-offstats-report/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ output:
knitr::opts_chunk$set(echo = FALSE, dpi = 300)
library(ggplot2)
library(scales)
library(captioner)
library(flextable)
library(officer)
library(magrittr)
Expand Down Expand Up @@ -102,11 +101,6 @@ chart <- ggplot(data = chart_data,
axis.line = element_line(colour = "grey"),
axis.ticks = element_line(colour = "grey")
)
# Figure numbering using the captioner package
fig_nums <- captioner(prefix = "Figure", infix = ":")
fig_nums(name = "chart",
caption = "title ^1,2,\\*,\\ \\*\\*\\ +\\ footnote\\ reference^")
```

# Introduction
Expand All @@ -121,7 +115,7 @@ Praesent congue molestie nisi, ut congue dui mattis in. Vivamus vel urna risus.
# Main Points
<Div custom-style = "Bullet 1">In tristique lobortis sagittis. Phasellus mollis mattis iaculis. Vivamus nunc justo, finibus nec maximus vel, ultricies vel urna. Ut ac mi sit amet augue fringilla egestas et ut mauris. Morbi volutpat, felis vel egestas scelerisque, nunc purus auctor ligula, non lobortis nulla felis in tortor. In nec commodo sem.</Div>
<Div custom-style = "Bullet 2">Proin vitae vehicula purus. Cras consequat iaculis venenatis. Morbi vel risus vestibulum, aliquet mi in, volutpat massa. Sed urna sem, posuere eu semper vitae, ullamcorper quis leo. Mauris nisi metus, scelerisque sed urna eu, maximus porttitor ante. Sed scelerisque accumsan commodo. Sed interdum justo volutpat, sodales nisi sed, consectetur arcu. Interdum et malesuada fames ac ante ipsum primis in faucibus.</Div>
<Div custom-style = "Bullet 1">Praesent congue molestie nisi, ut congue dui mattis in. Vivamus vel urna risus. Donec sed blandit ex. Donec vel aliquam velit, in vestibulum lectus.</Div>
<Div custom-style = "Bullet 1">Praesent congue molestie nisi, ut congue dui mattis in. **Vivamus vel urna risus**. Donec sed blandit ex. Donec vel aliquam velit, in vestibulum lectus.</Div>

\newpage

Expand Down Expand Up @@ -186,7 +180,7 @@ flextable(table_data2, theme_fun = NULL) %>%

\newpage

<Div custom-style = "Table or chart caption">`r fig_nums("chart")`</Div>
<Div custom-style = "Table or chart caption">Figure 1: title ^1,2,\*,\ \*\*\ +\ footnote\ reference^</Div>
```{r chart, fig.width=7.18, fig.height=3.31, fig.cap="Appropriate ALT Text to be added."}
chart
```
Expand Down Expand Up @@ -354,23 +348,23 @@ DD Month YYYY

## Appendix 3 - Early access details

### Pre-Release Access
### Pre-release access

Under terms of the "Pre-Release Access to Official Statistics (Scotland) Order 2008", PHS is obliged to publish information on those receiving Pre-Release Access ("Pre-Release Access" refers to statistics in their final form prior to publication). The standard maximum Pre-Release Access is five working days. Shown below are details of those receiving standard Pre-Release Access.

### Standard Pre-Release Access
### Standard pre-release access

Scottish Government Department of Health and Social Care (DHSC)

NHS Board Chief Executives

NHS Board Communication leads

### Early Access for Management Information
### Early access for management information

These statistics will also have been made available to those who needed access to 'management information', i.e. as part of the delivery of health and care:

### Early Access for Quality Assurance
### Early access for quality assurance

These statistics will also have been made available to those who needed access to help quality assure the publication:

Expand Down

0 comments on commit dee45a7

Please sign in to comment.