| Type: | Package | 
| Title: | Generate XMR Control Chart Data from Time-Series Data | 
| Description: | XMRs combine X-Bar control charts and Moving Range control charts. These functions also will recalculate the reference lines when significant change has occurred. | 
| Version: | 1.1.1 | 
| Date: | 2020-06-08 | 
| Maintainer: | Alex Zanidean <AZanidean@mhc.ab.ca> | 
| LazyData: | TRUE | 
| License: | GPL-3 | 
| BugReports: | https://github.com/Zanidean/xmrr/issues | 
| Imports: | dplyr, tidyr, ggplot2, purrr, rlang, tibble, qpdf | 
| RoxygenNote: | 7.1.0 | 
| Suggests: | testthat, knitr, rmarkdown | 
| VignetteBuilder: | knitr | 
| NeedsCompilation: | no | 
| Packaged: | 2020-06-08 21:13:16 UTC; AZanidean | 
| Author: | Alex Zanidean [aut, cre] | 
| Repository: | CRAN | 
| Date/Publication: | 2020-06-08 21:20:03 UTC | 
Generate the XMR data for any time-series data.
Description
Used to calculate XMR data.
Usage
xmr(
  df,
  measure,
  recalc = T,
  reuse,
  interval,
  longrun,
  shortrun,
  testing,
  prefer_longrun
)
Arguments
| df | The dataframe or tibble to calculate from. Data must be in a tidy format. At least one variable for time and one variable for measure. | 
| measure | The column containing the measure. Must be in numeric format. | 
| recalc | Logical: if you'd like it to recalculate bounds. Defaults to True | 
| reuse | Logical: Should points be re-used in calculations? Defaults to False | 
| interval | The interval you'd like to use to calculate the averages. Defaults to 5. | 
| longrun | Used to determine rules for long run. First point is the 'n' of points used to recalculate with, and the second is to determine what qualifies as a long run. Default is c(5,8) which uses the first 5 points of a run of 8 to recalculate the bounds. If a single value is used, then that value is used twice i.e. c(6,6)) | 
| shortrun | Used to determine rules for a short run. The first point is the minimum number of points within the set to qualify a shortrun, and the second is the length of a possible set. Default is c(3,4) which states that 3 of 4 points need to pass the test to be used in a calculation. If a single value is used, then that value is used twice i.e. c(3,3)) | 
| testing | Logical to print test results | 
| prefer_longrun | Logical if you want to first test for long-runs or for short-runs. | 
Tidyeval Version of xmr()
Description
Used to calculate XMR data. Now works with more tidy workflows.
Usage
xmr2(dataframe, measure, ...)
Arguments
| dataframe | The dataframe or tibble to calculate from. Data must be in a tidy format. At least one variable for time and one variable for measure. | 
| measure | The column containing the measure. Must be in numeric format. | 
| ... | Arguments to pipe to xmr | 
Generate the XMR chart for XMR data
Description
Useful for diagnostics on xmr, and just visualizing the data.
Usage
xmr_chart(
  dataframe,
  time,
  measure,
  boundary_linetype = "dashed",
  central_linetype = "dotted",
  boundary_colour = "#d02b27",
  point_colour = "#7ECBB5",
  point_size = 2,
  line_width = 0.5,
  text_size = 9
)
Arguments
| dataframe | Output from xmR() | 
| time | Time column | 
| measure | Measure | 
| boundary_linetype | Type of line for upper and lower boundary lines. Defaults to "dashed". | 
| central_linetype | Type of line for central line. Defaults to "dotted". | 
| boundary_colour | Colour of line for upper and lower boundary lines. Defaults to "#d02b27". | 
| point_colour | Colour of points. Defaults to "#7ECBB5". | 
| point_size | Size of points. Defaults to 2. | 
| line_width | Width of lines. Defaults to 0.5. | 
| text_size | Size of chart text. Defaults to 9. | 
Generate the XMR chart for XMR data.
Description
Useful for diagnostics on xmr, and just visualizing the data. Now works with more tidy workflows.
Usage
xmr_chart2(dataframe, time, measure, ...)
Arguments
| dataframe | Output from xmR() | 
| time | Time column | 
| measure | Measure | 
| ... | Arguments to pipe to xmr_chart() |