CalculateLimits: CalculateLimits

Description Usage Arguments Details Value Examples

Description

Evaluates whether to use custom limits or calculate them from the data.

Usage

1
2
CalculateLimits(x, lcl = NA, cl = NA, ucl = NA, type = "i",
  controlLimitDistance = 3)

Arguments

x

Numerical vector

lcl

Lower control limit, single value or NA

cl

Central line, single value or NA

ucl

Upper control limit, single value or NA

type

Type of control chart, either "i" for i-chart (default) or "c" for c-chart

controlLimitDistance

Multiple of st.dev to be used to calculate limits, possible values: 1, 2, 3 (default); this parameter affect the interpretation of lcl and ucl parameters

Details

If at least two limits were provided, the missing ones are calculated from the them. If one or zero limits were provided the rest is computed from data.

Value

Named list with limits

Examples

1
CalculateLimits(x = rnorm(10), lcl = NA, cl = 100, ucl = NA, type = 'i')

Example output

$ucl
[1] 101.8292

$cl
[1] 100

$lcl
[1] 98.17079

Rspc documentation built on May 2, 2019, 9:19 a.m.