Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (43 sloc) 2.74 KB
output: github_document
<!-- is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
collapse = TRUE,
comment = "#>",
fig.path = "README-"
## runchart
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](]( [![Travis-CI Build Status](]( [![AppVeyor Build Status](]( [![Coverage status](](
>A run chart is a simple analytical tool that helps us understand changes in data over time. - [NHS Healthcare Improvement Scotland](
A number of R packages exist to automate statistical process control charts. For example:
* [qicharts](
* [qcc](
* [ggQC](
The `runchart` package is different from the above because it focusses solely on run charts and provides the ability to automatically rephase baselines. The package exports a single easy to use function `runchart()`.
## Examples
By default - shifts and trends are displayed (triggering at 6 and 5 consecutive points respectively) and the baseline is not rephased:
```{r, warning = FALSE, fig.width = 7, fig.align = 'center'}
df <- data.frame(date = seq.Date(Sys.Date(), by = "day", length.out = 30),
value = c(4,3,3,2,2,3,3,4,4,4,4,3,3,2,2,1,2,1,0,3,3,4,5,6,7,9,8,7,6,6))
Both shifts and trends can be independantly suppressed. The baseline can be rephased (triggering at 9 consecutive points):
```{r, warning = FALSE, fig.width = 7, fig.align = 'center'}
runchart(df, shift = FALSE, trend = FALSE, rephase = TRUE)
Access the fields behind these plots by setting the output parameter to `df`:
```{r, warning = FALSE, fig.width = 7, fig.align = 'center'}
head(runchart(df, output = 'df'))
## Installation
This package is available for download from GitHub:
## Contributing
This project is released with a [Contributor Code of Conduct]( By contributing to this project, you agree to abide by its terms.
You can’t perform that action at this time.