![](/img/trans.png)
[英]How to just print the chart from `mult.chart` in MSQC package for statistical process control
[英]MSQC::mult.chart ignores xlim argument
不幸的是, MSQC::mult.chart
不支持xlim
参数。 但是您可以提取值以进行绘制和手动复制。 请参见下面的示例。
library(MSQC)
data(dowel1)
# default
mult.chart(dowel1, type = "chi", alpha = 0.05)
#> [[1]]
#> [1] "Chi-squared Control Chart"
#>
#> $ucl
#> [1] 5.99
#>
#> $t2
#> [,1]
#> [1,] 1.62
#> ...
#>
#> $Xmv
#> [1] 0.5 1.0
#>
#> $covariance
#> [,1] [,2]
#> [1,] 4.9e-05 8.6e-05
#> [2,] 8.6e-05 4.2e-04
# manual
mc <- mult.chart(dowel1, type = "chi", alpha = 0.05)
plot(seq_along(mc$t2), mc$t2, ylim = c(0, mc$ucl), type = "l")
points(seq_along(mc$t2), mc$t2)
abline(h = mc$ucl, col = 2)
# restricted
plot(seq_along(mc$t2), mc$t2, ylim = c(0, mc$ucl), type = "l", xlim = c(5, 20))
points(seq_along(mc$t2), mc$t2)
abline(h = mc$ucl, col = 2)
由reprex软件包 (v0.2.1)创建于2019-02-10
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.