R6Class representing a control chart consisting of ControlChartPhases
and ControlChartControlLines.
1 2 3 4 5 | control_chart = ControlChart$new(name, type)
control_chart$add_phase(ControlChartPhase$new(name))
control_chart$get_table()
|
new(name, type = c("xbar_R", "xbar_s", "R", "s", "p"))Initialize the control chart.
name | Character. Name of
the control chart. |
type | Character. Type of
the control chart.
|
add_control_line(control_line)Add an object of class
ControlChartControlLine to the control chart.
add_phase(phase)Add an object of class
link{ControlChartPhase} to the control chart.
get_control_line(id = id)Get the control chart's control line
with id == id.
get_control_line_ids()Get all control line ids as a character vector.
get_control_line_values()Get all control line values as a numeric vector.
get_id()Get the control chart's id.
get_name()Get the control chart's name.
get_params()Get the parameters of the control charts preliminary phases values used to calculate the control line values.
get_phase(id)Get the control chart's phase with
id == id.
get_phase_ids(preliminary = NULL)Get all phases ids as a character vector.
preliminary | If NULL all ids,
if TRUE only ids of preliminary phases,
if FALSE only ids of non-preliminary
phases are returned.
|
get_plot()Get the control chart's plot as a
plotly plot.
get_table(sample_count = c("chart", "phase"),
preliminary = NULL)Get a tibble with
columns "phase", "sample", "value".
sample_count | If "chart" samples are counted from
the perspective of the chart, if "phase" from the perspective
of each phase. |
preliminary | If NULL all rows,
if TRUE only rows of preliminary phases,
if FALSE only rows of non-preliminary
phases are returned.
|
get_type()Get the control chart's type.
Remove the phase with id == id.
set_name(name)Set the control chart's name.
name | Character. New name.
|
set_phase_names(new_names, old_names = NULL)Set the names
of one or more control chart's phases. If old_names = NULL the
length of new_names must be equal to the number of the control
chart's phases, otherwise the length of new_names and old_names
has to be equal.
new_names | Character
vector. |
old_names | Character
vector or NULL.
|
set_type(type = c("xbar_R", "xbar_s", "R", "s", "p"))Set the control chart's type.
type | Character. New type.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.