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. |
Authors: | Alex Zanidean [aut, cre] |
Maintainer: | Alex Zanidean <[email protected]> |
License: | GPL-3 |
Version: | 1.1.1 |
Built: | 2025-02-08 04:22:51 UTC |
Source: | https://github.com/zanidean/xmrr |
Used to calculate XMR data.
xmr( df, measure, recalc = T, reuse, interval, longrun, shortrun, testing, prefer_longrun )
xmr( df, measure, recalc = T, reuse, interval, longrun, shortrun, testing, prefer_longrun )
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. |
Useful for diagnostics on xmr, and just visualizing the data.
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 )
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 )
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. |
Useful for diagnostics on xmr, and just visualizing the data. Now works with more tidy workflows.
xmr_chart2(dataframe, time, measure, ...)
xmr_chart2(dataframe, time, measure, ...)
dataframe |
Output from xmR() |
time |
Time column |
measure |
Measure |
... |
Arguments to pipe to xmr_chart() |
Used to calculate XMR data. Now works with more tidy workflows.
xmr2(dataframe, measure, ...)
xmr2(dataframe, measure, ...)
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 |