尝试添加包含本机最小函数的计算值

时间:2017-11-14 17:47:14

标签: r min

我想在数据框中添加一个计算列,在每个STEP_NAME系列(R1,R2 ...)上找到CpK,并将DATA列作为度量

Cpk的Calcul是:

m <- mean(table1$Data)
s <- sd(table1$Data)

Ts <- max(table1$HIGH_LIMIT)
Ti <- min(table1$LOW_LIMIT) 

CpK <- min((m-Ti)/(3*s), (Ts-m)/(3*s))

我试过

library(dplyr)
table2 <- table1 %>%
group_by(STEP_NAME) %>%
summarise(m = mean(DATA), s = sd(DATA), Ts = max(High_Limit),
          Ts = max(High_Limit), Ti = min(LOW_LIMIT)) %>%
          mutate(CpK = min((m-Ti)/(3*s), (Ts-m)/(3*s)))

CpK值总是一个常数,我猜min函数不能用这种格式,任何想法?我也尝试用Cp =(Ts-Ti)/ 6s添加Cp列,效果很好

这里是我的数据框样本的dput()导出:

structure(list(UUT_NAME = structure(c(31L, 31L, 31L, 31L, 31L, 
12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 30L, 30L, 30L, 
30L, 30L, 30L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 
15L, 15L, 15L, 15L, 15L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 
16L, 16L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 
10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 
10L, 5L, 5L, 5L, 5L, 5L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 
13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 14L, 
14L, 14L, 14L, 14L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 24L, 
24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 18L, 18L, 18L, 18L, 
18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 
18L, 18L, 18L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 
8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 7L, 
7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 
7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 
7L, 7L, 8L, 8L, 8L, 8L, 8L, 20L, 20L, 20L, 20L, 20L, 4L, 4L, 
4L, 4L, 4L, 23L, 23L, 23L, 23L, 23L, 20L, 20L, 20L, 20L, 20L, 
23L, 23L, 23L, 23L, 23L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 
4L, 4L, 4L, 4L, 4L, 4L, 23L, 23L, 23L, 23L, 23L, 21L, 21L, 21L, 
21L, 21L, 9L, 9L, 9L, 9L, 9L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 
29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 
29L, 29L, 29L, 29L, 29L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 
22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 11L, 
11L, 11L, 11L, 11L, 28L, 28L, 28L, 28L, 28L, 28L, 28L, 28L, 28L, 
28L, 28L, 28L, 28L, 28L, 28L, 32L, 32L, 32L, 32L, 32L, 32L, 32L, 
32L, 32L, 32L, 25L, 25L, 25L, 25L, 25L, 32L, 32L, 32L, 32L, 32L, 
27L, 27L, 27L, 27L, 27L, 26L, 26L, 26L, 26L, 26L, 19L, 19L, 19L, 
19L, 19L, 1L, 1L, 1L, 1L, 1L, 19L, 19L, 19L, 19L, 19L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 19L, 19L, 
19L, 19L, 19L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 
3L, 3L, 3L, 3L, 3L, 3L, 3L), .Label = c("CELOGIC.MA-0530", "CELOGIC.MA-0742", 
"CELOGIC.MA-0747", "CELOGIC.MA-0817", "CELOGIC.MA-0887", "CELOGIC.MA-0906", 
"CELOGIC.MA-100", "CELOGIC.MA-102", "CELOGIC.MA-1441", "CELOGIC.MA-1610", 
"CELOGIC.MA-1611", "CELOGIC.MA-2161", "CELOGIC.MA-2189", "CELOGIC.MA-2316", 
"CELOGIC.MA-2374", "CELOGIC.MA-2454", "CELOGIC.MA-2609", "CELOGIC.MA-2610", 
"CELOGIC.MA-2616", "CELOGIC.MA-2641", "CELOGIC.MA-3029", "CELOGIC.MA-3044", 
"CELOGIC.MA-3083", "CELOGIC.MA-3154", "CELOGIC.MA-3238", "CELOGIC.MA-3786", 
"CELOGIC.MA-3826", "CELOGIC.MA-4066", "CELOGIC.MA-4305", "CELOGIC.MA-4329", 
"CELOGIC.MA-6475", "CELOGIC.MA-9014"), class = "factor"), STATION_NUM = structure(c(1L, 
1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 4L, 4L, 4L, 
4L, 4L, 4L, 4L, 4L, 4L, 4L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 5L, 5L, 5L, 5L, 5L, 
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5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L, 5L, 5L, 4L, 4L, 
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 
4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L), .Label = c("00 00297", "00 00323", 
"00 00362", "00 00366", "00 00399"), class = "factor"), START_DATE_TIME = structure(c(1L, 
1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 4L, 5L, 
5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 
8L, 8L, 8L, 9L, 9L, 9L, 9L, 9L, 10L, 10L, 10L, 10L, 10L, 11L, 
11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 12L, 13L, 13L, 13L, 13L, 
13L, 14L, 14L, 14L, 14L, 14L, 15L, 15L, 15L, 15L, 15L, 16L, 16L, 
16L, 16L, 16L, 17L, 17L, 17L, 17L, 17L, 18L, 18L, 18L, 18L, 18L, 
19L, 19L, 19L, 19L, 19L, 20L, 20L, 20L, 20L, 20L, 21L, 21L, 21L, 
21L, 21L, 22L, 22L, 22L, 22L, 22L, 23L, 23L, 23L, 23L, 23L, 24L, 
24L, 24L, 24L, 24L, 25L, 25L, 25L, 25L, 25L, 28L, 28L, 28L, 28L, 
28L, 26L, 26L, 26L, 26L, 26L, 27L, 27L, 27L, 27L, 27L, 29L, 29L, 
29L, 29L, 29L, 30L, 30L, 30L, 30L, 30L, 31L, 31L, 31L, 31L, 31L, 
32L, 32L, 32L, 32L, 32L, 33L, 33L, 33L, 33L, 33L, 34L, 34L, 34L, 
34L, 34L, 35L, 35L, 35L, 35L, 35L, 36L, 36L, 36L, 36L, 36L, 39L, 
39L, 39L, 39L, 39L, 37L, 37L, 37L, 37L, 37L, 38L, 38L, 38L, 38L, 
38L, 40L, 40L, 40L, 40L, 40L, 41L, 41L, 41L, 41L, 41L, 42L, 42L, 
42L, 42L, 42L, 43L, 43L, 43L, 43L, 43L, 44L, 44L, 44L, 44L, 44L, 
45L, 45L, 45L, 45L, 45L, 46L, 46L, 46L, 46L, 46L, 47L, 47L, 47L, 
47L, 47L, 48L, 48L, 48L, 48L, 48L, 49L, 49L, 49L, 49L, 49L, 50L, 
50L, 50L, 50L, 50L, 51L, 51L, 51L, 51L, 51L, 52L, 52L, 52L, 52L, 
52L, 53L, 53L, 53L, 53L, 53L, 54L, 54L, 54L, 54L, 54L, 55L, 55L, 
55L, 55L, 55L, 56L, 56L, 56L, 56L, 56L, 57L, 57L, 57L, 57L, 57L, 
58L, 58L, 58L, 58L, 58L, 59L, 59L, 59L, 59L, 59L, 60L, 60L, 60L, 
60L, 60L, 61L, 61L, 61L, 61L, 61L, 62L, 62L, 62L, 62L, 62L, 63L, 
63L, 63L, 63L, 63L, 64L, 64L, 64L, 64L, 64L, 65L, 65L, 65L, 65L, 
65L, 66L, 66L, 66L, 66L, 66L, 67L, 67L, 67L, 67L, 67L, 68L, 68L, 
68L, 68L, 68L, 69L, 69L, 69L, 69L, 69L, 70L, 70L, 70L, 70L, 70L, 
71L, 71L, 71L, 71L, 71L, 72L, 72L, 72L, 72L, 72L, 73L, 73L, 73L, 
73L, 73L, 74L, 74L, 74L, 74L, 74L, 75L, 75L, 75L, 75L, 75L, 76L, 
76L, 76L, 76L, 76L, 77L, 77L, 77L, 77L, 77L, 78L, 78L, 78L, 78L, 
78L, 79L, 79L, 79L, 79L, 79L, 80L, 80L, 80L, 80L, 80L, 81L, 81L, 
81L, 81L, 81L, 82L, 82L, 82L, 82L, 82L, 83L, 83L, 83L, 83L, 83L, 
84L, 84L, 84L, 84L, 84L, 85L, 85L, 85L, 85L, 85L, 86L, 86L, 86L, 
86L, 86L), .Label = c("2014-01-27 16:30:38", "2014-05-13 13:58:38", 
"2014-05-13 14:09:17", "2014-05-13 14:30:51", "2014-05-13 14:31:38", 
"2014-06-19 14:30:36", "2014-06-19 14:39:36", "2014-06-19 14:42:13", 
"2014-09-05 09:26:10", "2014-09-05 09:35:27", "2015-03-06 07:50:56", 
"2015-03-06 07:59:56", "2015-03-09 13:52:21", "2015-03-09 14:36:44", 
"2015-03-09 14:50:37", "2015-03-17 14:19:37", "2015-10-30 14:47:55", 
"2015-10-30 14:49:22", "2015-10-30 14:49:49", "2015-10-30 15:03:52", 
"2015-11-02 14:52:56", "2015-11-02 15:30:48", "2015-11-02 15:52:41", 
"2015-11-02 16:12:23", "2015-11-03 09:20:08", "2016-03-09 14:14:01", 
"2016-03-09 16:02:18", "2016-03-09 16:12:04", "2016-03-10 09:07:24", 
"2016-06-02 09:45:43", "2016-06-02 10:35:59", "2016-07-22 15:43:27", 
"2016-07-25 08:52:49", "2016-07-25 09:48:51", "2016-07-25 10:31:02", 
"2016-07-25 11:22:45", "2016-07-25 13:13:20", "2016-07-25 13:16:02", 
"2016-07-25 13:25:13", "2016-07-25 14:35:31", "2016-07-26 08:50:27", 
"2016-07-26 09:40:45", "2016-11-08 09:04:39", "2016-11-08 09:57:37", 
"2016-11-08 10:35:04", "2016-11-08 10:57:24", "2016-11-08 11:23:43", 
"2016-11-08 11:38:34", "2016-11-08 11:50:57", "2016-11-08 11:52:16", 
"2016-11-08 14:38:58", "2016-12-05 11:08:50", "2016-12-05 13:54:25", 
"2017-01-16 09:49:57", "2017-01-16 10:12:53", "2017-01-17 08:34:57", 
"2017-01-17 08:52:37", "2017-01-17 14:08:12", "2017-02-01 10:52:23", 
"2017-02-01 11:07:24", "2017-02-17 14:32:11", "2017-02-17 14:36:12", 
"2017-03-07 15:58:40", "2017-03-27 11:40:27", "2017-03-28 09:42:13", 
"2017-03-28 09:48:34", "2017-06-13 11:34:39", "2017-06-13 14:13:07", 
"2017-06-13 14:35:58", "2017-06-13 15:11:44", "2017-07-24 14:51:53", 
"2017-09-19 09:44:11", "2017-09-19 10:04:29", "2017-09-19 10:28:29", 
"2017-09-19 11:02:42", "2017-09-19 13:56:57", "2017-09-19 14:03:18", 
"2017-09-19 14:04:32", "2017-09-19 14:13:17", "2017-09-28 14:22:38", 
"2017-09-28 14:43:03", "2017-09-28 15:29:59", "2017-09-28 15:31:28", 
"2017-09-28 15:36:36", "2017-09-28 15:49:51", "2017-09-28 16:10:26"
), class = "factor"), LOW_LIMIT = c(88, 87.9, 2.08, 29.1, 29.1, 
88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 88, 
87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 
2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 
29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 
29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 
88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 
2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 
29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 
29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 
88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 
2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 
29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 
29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 
88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 
2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 
29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 
29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 
88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 
2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 
29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 
29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 
88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 
2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 
29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 
29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 
88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 
2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 
29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 
29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 
88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 
2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 
29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 
29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 
88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 
2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 
29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 
29.1, 88, 87.9, 2.08, 29.1, 29.1, 88, 87.9, 2.08, 29.1, 29.1, 
88, 87.9, 2.08, 29.1, 29.1), DATA = c(103.83455, 89.64711, 2.13345, 
30.057545, 30.086464, 104.37667, 89.788269, 2.13431, 30.045176, 
30.049561, 104.7235, 89.813126, 2.134059, 30.048182, 30.056608, 
104.03241, 103.96976, 89.63073, 2.141897, 30.035461, 30.104946, 
104.51376, 90.733009, 2.141215, 30.147131, 30.113092, 107.34245, 
90.934967, 2.140769, 30.136806, 30.114983, 105.98895, 90.628517, 
2.141326, 30.142355, 30.122778, 103.49479, 90.358688, 2.141122, 
30.058239, 30.06591, 103.60199, 90.354286, 2.142168, 30.063662, 
30.070904, 102.51865, 90.974564, 2.148871, 29.983458, 30.128607, 
103.016, 90.883461, 2.148184, 29.975309, 30.137098, 102.54838, 
89.871902, 2.142678, 29.947052, 30.094099, 102.50674, 89.974739, 
2.142947, 29.953632, 30.089359, 102.88899, 90.077881, 2.142447, 
29.951406, 30.092203, 105.72658, 89.542099, 2.143392, 29.941921, 
29.980062, 104.56109, 90.826813, 2.13772, 29.979958, 30.028364, 
104.10088, 90.849869, 2.136499, 29.981756, 30.028885, 105.10763, 
90.826553, 2.137116, 29.984587, 30.029911, 104.18301, 90.603035, 
2.136766, 29.987928, 30.042906, 103.85734, 90.941826, 2.135956, 
29.919226, 30.054958, 106.41589, 90.797607, 2.134154, 30.109236, 
30.025709, 106.77251, 90.557838, 2.132611, 30.115213, 30.049799, 
104.15064, 90.598541, 2.136247, 30.099293, 29.956236, 104.50943, 
90.196915, 2.136503, 30.089535, 29.956837, 104.67191, 90.35878, 
2.145689, 30.158304, 30.004744, 103.27634, 90.543076, 2.144124, 
30.138008, 29.987755, 103.43541, 90.312469, 2.145076, 30.144836, 
29.99951, 103.84418, 90.39769, 2.145807, 30.145554, 29.995651, 
103.39602, 90.332397, 2.146439, 30.082825, 30.07023, 103.07425, 
90.374924, 2.145505, 30.075659, 30.067387, 102.41218, 89.970772, 
2.135011, 30.171347, 30.038151, 102.64326, 90.041145, 2.13542, 
30.17922, 30.034796, 102.55943, 89.94989, 2.136524, 30.172457, 
30.039785, 106.16189, 90.254478, 2.143642, 30.03858, 30.034452, 
105.13081, 90.153961, 2.143321, 30.020109, 30.049246, 106.46228, 
90.300667, 2.14456, 30.033245, 30.04554, 105.26501, 90.428741, 
2.144274, 30.013161, 30.02133, 105.58955, 90.363289, 2.1433, 
30.015482, 30.013422, 105.24362, 90.616943, 2.144161, 30.019264, 
30.023048, 105.71942, 90.295998, 2.144891, 30.040255, 30.038618, 
102.86487, 90.426964, 2.135716, 30.147213, 30.024424, 106.71793, 
90.416763, 2.142324, 29.969154, 30.00629, 103.83101, 90.53817, 
2.140727, 30.008778, 30.064625, 103.05832, 90.361076, 2.13503, 
30.027338, 29.993675, 106.10006, 90.594826, 2.142059, 29.958195, 
29.987673, 104.86755, 90.49144, 2.135422, 30.024847, 29.990158, 
104.23051, 90.12674, 2.141112, 30.018059, 30.079882, 104.76202, 
90.318901, 2.135574, 30.027168, 29.994877, 104.43105, 90.119614, 
2.140357, 30.023642, 30.085588, 104.82088, 90.318939, 2.134686, 
30.028111, 29.993246, 104.47222, 90.162384, 2.140747, 30.012562, 
30.121384, 105.17671, 90.8339, 2.137395, 30.059807, 30.14035, 
103.39295, 90.590065, 2.145206, 30.091719, 29.96744, 104.08862, 
89.958221, 2.145849, 30.108145, 29.999678, 103.35049, 90.352165, 
2.145873, 30.091724, 29.978664, 103.6749, 90.710175, 2.145678, 
30.0951, 29.98218, 104.70875, 90.30056, 2.144813, 30.094131, 
29.991529, 105.17446, 90.537613, 2.142141, 30.003885, 29.930983, 
104.83267, 90.660332, 2.141441, 30.012733, 29.938503, 104.96903, 
90.514137, 2.142737, 29.996761, 29.921858, 105.91333, 90.392693, 
2.142066, 29.996334, 29.932619, 102.83725, 90.443596, 2.150893, 
30.078348, 30.150576, 104.02214, 89.949432, 2.139457, 30.164099, 
30.147629, 103.8532, 90.113785, 2.138755, 30.176195, 30.155697, 
103.58204, 89.905396, 2.139221, 30.16864, 30.15527, 107.18325, 
90.292488, 2.143229, 30.068497, 30.207439, 105.38244, 90.118889, 
2.143076, 30.074533, 30.210369, 103.70168, 90.110695, 2.135857, 
30.069971, 29.974039, 106.00477, 90.324944, 2.143227, 30.061428, 
30.197681, 104.40753, 90.338608, 2.136585, 30.070391, 30.036024, 
104.39215, 89.585129, 2.139386, 30.088642, 29.965807, 103.16625, 
90.1008, 2.147998, 30.065079, 30.106453, 104.23954, 90.078255, 
2.144455, 30.073795, 30.09936, 102.45847, 90.38028, 2.14762, 
30.050428, 30.095728, 104.51608, 90.032143, 2.145565, 30.091145, 
30.100916, 104.83134, 90.170525, 2.14517, 30.088293, 30.095644, 
104.60923, 89.934662, 2.145767, 30.079401, 30.102394, 103.24618, 
90.006889, 2.148073, 30.064478, 30.1042, 105.26569, 90.563705, 
2.138664, 30.020033, 29.971384, 106.9408, 90.529907, 2.135091, 
30.091959, 30.089626, 107.18589, 90.570724, 2.134622, 30.084194, 
30.090492, 107.58999, 90.535423, 2.135308, 30.085833, 30.089886, 
106.36217, 90.431122, 2.135268, 30.083925, 30.091526, 105.21892, 
90.754059, 2.138996, 30.021669, 29.973015, 104.85383, 90.454239, 
2.139157, 30.031807, 29.982101), HIGH_LIMIT = c(112, 93.9, 2.22, 
31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 
31.1, 112, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 
31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 
112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 
93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 
2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 
31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 
31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 
112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 
93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 
2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 
31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 
31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 
112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 
93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 
2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 
31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 
31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 
112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 
93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 
2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 
31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 
31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 
112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 
93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 
2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 
31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 
31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 
112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 
93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 
2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 
31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 
31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 
112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 
93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 
2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 
31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 
31.1, 112, 93.9, 2.22, 31.1, 31.1, 112, 93.9, 2.22, 31.1, 31.1, 
112, 93.9, 2.22, 31.1, 31.1), UNITS = structure(c(2L, 1L, 1L, 
1L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 
1L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 
1L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 1L,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 4L, 5L, 1L, 2L, 3L, 
    4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 
    4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 
    4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 
    4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L), .Label = c("C10", 
    "R1", "R2", "R3", "R4"), class = "factor")), .Names = c("UUT_NAME", 
"STATION_NUM", "START_DATE_TIME", "LOW_LIMIT", "DATA", "HIGH_LIMIT", 
"UNITS", "STEP_NAME"), class = "data.frame", row.names = c("32", 
"104", "105", "106", "107", "1005", "1077", "1078", "1079", "1080", 
"1978", "2050", "2051", "2052", "2053", "2951", "3023", "3095", 
"3096", "3097", "3098", "3996", "4068", "4069", "4070", "4071", 
"4892", "4964", "4965", "4966", "4967", "5534", "5606", "5607", 
"5608", "5609", "6507", "6579", "6580", "6581", "6582", "7430", 
"7502", "7503", "7504", "7505", "8414", "8486", "8487", "8488", 
"8489", "8918", "8990", "8991", "8992", "8993", "9426", "9498", 
"9499", "9500", "9501", "10399", "10471", "10472", "10473", "10474", 
"10903", "10975", "10976", "10977", "10978", "11876", "11948", 
"11949", "11950", "11951", "12849", "12921", "12922", "12923", 
"12924", "13445", "13517", "13518", "13519", "13520", "13748", 
"13820", "13821", "13822", "13823", "14721", "14793", "14794", 
"14795", "14796", "15694", "15766", "15767", "15768", "15769", 
"16667", "16739", "16740", "16741", "16742", "17640", "17712", 
"17713", "17714", "17715", "18144", "18216", "18217", "18218", 
"18219", "18787", "18859", "18860", "18861", "18862", "19760", 
"19832", "19833", "19834", "19835", "20264", "20336", "20337", 
"20338", "20339", "21237", "21309", "21310", "21311", "21312", 
"22210", "22282", "22283", "22284", "22285", "23183", "23255", 
"23256", "23257", "23258", "24156", "24228", "24229", "24230", 
"24231", "25128", "25200", "25201", "25202", "25203", "26101", 
"26173", "26174", "26175", "26176", "26605", "26677", "26678", 
"26679", "26680", "27578", "27650", "27651", "27652", "27653", 
"28082", "28154", "28155", "28156", "28157", "29055", "29127", 
"29128", "29129", "29130", "29695", "29767", "29768", "29769", 
"29770", "30199", "30271", "30272", "30273", "30274", "31172", 
"31244", "31245", "31246", "31247", "32145", "32217", "32218", 
"32219", "32220", "33118", "33190", "33191", "33192", "33193", 
"34091", "34163", "34164", "34165", "34166", "34687", "34759", 
"34760", "34761", "34762", "35660", "35732", "35733", "35734", 
"35735", "36633", "36705", "36706", "36707", "36708", "37606", 
"37678", "37679", "37680", "37681", "38026", "38098", "38099", 
"38100", "38101", "38665", "38737", "38738", "38739", "38740", 
"39169", "39241", "39242", "39243", "39244", "40142", "40214", 
"40215", "40216", "40217", "41115", "41187", "41188", "41189", 
"41190", "42088", "42160", "42161", "42162", "42163", "43061", 
"43133", "43134", "43135", "43136", "44034", "44106", "44107", 
"44108", "44109", "44592", "44664", "44665", "44666", "44667", 
"45054", "45126", "45127", "45128", "45129", "45475", "45547", 
"45548", "45549", "45550", "46448", "46520", "46521", "46522", 
"46523", "47421", "47493", "47494", "47495", "47496", "48394", 
"48466", "48467", "48468", "48469", "48991", "49063", "49064", 
"49065", "49066", "49964", "50036", "50037", "50038", "50039", 
"50937", "51009", "51010", "51011", "51012", "51910", "51982", 
"51983", "51984", "51985", "52414", "52486", "52487", "52488", 
"52489", "53387", "53459", "53460", "53461", "53462", "54360", 
"54432", "54433", "54434", "54435", "54865", "54937", "54938", 
"54939", "54940", "55838", "55910", "55911", "55912", "55913", 
"56811", "56883", "56884", "56885", "56886", "57784", "57856", 
"57857", "57858", "57859", "58757", "58829", "58830", "58831", 
"58832", "59730", "59802", "59803", "59804", "59805", "60703", 
"60775", "60776", "60777", "60778", "61676", "61748", "61749", 
"61750", "61751", "62394", "62466", "62467", "62468", "62469", 
"62898", "62970", "62971", "62972", "62973", "63871", "63943", 
"63944", "63945", "63946", "64844", "64916", "64917", "64918", 
"64919", "65348", "65420", "65421", "65422", "65423", "66375", 
"66447", "66448", "66449", "66450", "66656", "66728", "66729", 
"66730", "66731", "67251", "67323", "67324", "67325", "67326", 
"68220", "68292", "68293", "68294", "68295", "68864", "68936", 
"68937", "68938", "68939"))

1 个答案:

答案 0 :(得分:0)

我必须承认,这有点奇怪。 我认为mingroup_by之间存在一些意料之外的互动,但我并不完全确定。 几乎似乎有些错误。发生了什么last grouping variable is dropped。这对于很多不同的情况实际上是有意义的,但不是你的。不过,我们可以破解它的方式:

table1 %>%
    group_by(STEP_NAME) %>%
    summarise(m = mean(DATA), s = sd(DATA), Ts = max(HIGH_LIMIT),
              Ts = max(HIGH_LIMIT), Ti = min(LOW_LIMIT)) %>%
    mutate(CpK1 = (m-Ti)/(3*s), 
           CpK2 = (Ts-m)/(3*s)) %>%
    mutate(CpK = ifelse(CpK1 < CpK2, CpK1, CpK2)) %>%
    select(-CpK1, -CpK2)

# A tibble: 5 x 6
  STEP_NAME          m           s     Ts    Ti      CpK
     <fctr>      <dbl>       <dbl>  <dbl> <dbl>    <dbl>
1       C10 104.522294 1.282699532 112.00 88.00 1.943221
2        R1  90.335988 0.327022906  93.90 87.90 2.482994
3        R2   2.140924 0.004407826   2.22  2.08 4.607264
4        R3  30.058242 0.061715734  31.10 29.10 5.175568
5        R4  30.050151 0.065536919  31.10 29.10 4.832650

另一种方法是在group_by电话后添加另一个summarise来电:

table1 %>%
    group_by(STEP_NAME) %>%
    summarise(m = mean(DATA), s = sd(DATA), Ts = max(HIGH_LIMIT),
              Ts = max(HIGH_LIMIT), Ti = min(LOW_LIMIT)) %>%
    group_by(STEP_NAME) %>%
    mutate(CpK = min((m-Ti)/(3*s), (Ts-m)/(3*s)))

# A tibble: 5 x 6
# Groups:   STEP_NAME [5]
  STEP_NAME          m           s     Ts    Ti      CpK
     <fctr>      <dbl>       <dbl>  <dbl> <dbl>    <dbl>
1       C10 104.522294 1.282699532 112.00 88.00 1.943221
2        R1  90.335988 0.327022906  93.90 87.90 2.482994
3        R2   2.140924 0.004407826   2.22  2.08 4.607264
4        R3  30.058242 0.061715734  31.10 29.10 5.175568
5        R4  30.050151 0.065536919  31.10 29.10 4.832650