-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreport.Rmd
70 lines (48 loc) · 1.36 KB
/
report.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
title: "report"
author: "PLR"
date: "`r Sys.Date()`"
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, collapse = TRUE, cache = FALSE)
```
## Setup
Load required packages first
```{r load packages}
# "tibble","tidyverse","here"
library(tibble)
library(tidyverse)
library(here)
library(targets)
```
## Load Targets functions
We source required Target functions to create the output elements for this report:
```{r}
source(here("R","study_functions.R"))
```
## Create objects from functions
This adhoc. source_all() function can be used in the future to source any new R script that we might save in the R folder. Where Targets will look for sourcing any R script from.
```{r}
source_all("R")
```
## Data all files combined
We check the final data frame created in the pipeline after merging all three Attendances files
```{r}
tar_read(one_two_combined)
```
## Type I Accident and Emergency Attendances plot
This section includes the plot for Type I A&E Attendances created in the pipeline
```{r}
tar_read(plot_1_report)
```
## Type II Accident and Emergency Attendances
Total number of Type II A&E Attendances from 2011 to December 2023
```{r}
tar_read(plot_2_report)
```
## Type III Accident and Emergency Attendances
Total number of Type III A&E Attendances from 2011 to December 2023
```{r}
tar_read(plot_3_report)
```