Repository navigation
v0.2.0 — XbarS charts, and missing values handled consistently
This release adds the XbarS chart, improves how missing values are handled, and
makes the table of results the same shape for a given chart type whatever the
data. It also gives notice of changes coming in 0.3.0, listed at the end.
Breaking changes
The results table. For MR, P and P' charts, y now holds the values you
supplied, and a new column series holds the values analysed and plotted (the
moving ranges, or the percentages). y_numerator is gone. Code that reads these
columns needs series in place of y, and y in place of y_numerator. Every
chart type also returns a new column, sd_estimate, and a new column
limit_extension, and autospc(plot_chart = FALSE) and as.data.frame() on a
plot now return the same table. The label placement columns cl_label,
annotation_level and annotation_curvature have gone from it, as have the P
and P' working columns constant, pbar, ucl_display and lcl_display.
Results that change.
- Missing values: a calculation period now holds
period_minpoints rather
thanperiod_minrows, control limits carry across a gap, and a missing point
no longer silently splits a run (see the new argumentna_ends_run). - A point on the centre line no longer ends the run it sits in.
- The exact values of d2 and D4 are used, so X, C' and P' limits sit 0.034%
closer to the centre line;options(autospc.rounded_constants = TRUE)
restores the rounded values. - Limits are constrained to the range the statistic can take on every row;
options(autospc.constrain_limits = FALSE)turns this off. - Limits extended with
extend_limits_tostart one subgroup's gap after
the last subgroup, and on P and P' charts are placed more consistently. Only
the extension rows change.
Data that is refused. X, MR and XMR charts reject a repeated x. P and P'
charts refuse a numerator outside 0 to n, and a negative denominator.
override_annotation_dist and override_annotation_dist_P, defunct since
0.1.0, have gone. Use upper_annotation_sf and lower_annotation_sf.
New
- XbarS charts.
chart_type = "XbarS"draws an Xbar chart of subgroup
means above an S chart of subgroup standard deviations, and"Xbar"and"S"
draw either on its own. Give one row per measurement, or rows summarising
measurements by their mean (y), number (n) and sample standard deviation
(the new arguments). Seevignette("data-requirements"). override_y_limsets the lower end of the vertical axis as well as the upper,
and the axis zooms rather than clipping, so nothing is dropped from the drawing.aggregation_na_rmchooses whether an observation with no value makes its
subgroup missing (the default) or is left out.- Package options
autospc.rounded_constants,autospc.constrain_limits
andautospc.warn_missing_x, documented in?autospc-package. - Argument checks for the text, colour and date format arguments, and
clearer errors for a column that is not in the data.
Fixes
Includes: facet_stages() with a paired chart type held in a variable, with
no stage long enough for limits, or with a single stage; a floating median on a
short series; a spurious warning about max() on series shorter than
floating_median_n; and the dates in ed_attendances_monthly, which were
sometimes the last day of the previous month.
Coming in 0.3.0
These warn now, so that nothing changes without notice.
- The default of
max_exclusionswill change from 3 to 0, so that points are
excluded from a period's limits only when you ask for it. Where points are
excluded this moves the limits, and can change where they are re-established.
Until then, a call that leavesmax_exclusionsunset and excludes points
warns. Setmax_exclusions = 3to keep your current results, or0to adopt
the new default now. show_mr,write_tableandfacet_stages(split_rows)will be removed.
Usechart_type,plot_chart = FALSEandsplit_at.split_atcounts points on
the chart rather than rows of the data; where the data already holds one row
per subgroup, inxorder, the two are the same.no_regrets = TRUEwithoverhanging_reversions = FALSEwill become an
error.
Full details
See NEWS.md for the
complete list, with what each change does and why.
Installing
remotes::install_github("HorridTom/autospc@v0.2.0")