Open cici7941 opened 5 years ago
For this code block to calculate the critical limits, I don't see a difference when there are outliers or not since limit_tbl$limit_lower and limit_tbl$limit_upper come from limits[1]) and limits[2] which are the same for each row.
limit_tbl$limit_lower
limit_tbl$limit_upper
limits[1])
limits[2]
if (any(vals_tbl$outlier == "No")) { # Non outliers identified, pick first limit limit_tbl <- vals_tbl %>% dplyr::filter(outlier == "No") %>% dplyr::slice(1) limits_vec <- c( limit_lower = limit_tbl$limit_lower, limit_upper = limit_tbl$limit_upper ) } else { # All outliers, pick last limits limit_tbl <- vals_tbl %>% dplyr::slice(n()) limits_vec <- c( limit_lower = limit_tbl$limit_lower, limit_upper = limit_tbl$limit_upper ) }```
For this code block to calculate the critical limits, I don't see a difference when there are outliers or not since
limit_tbl$limit_lower
andlimit_tbl$limit_upper
come fromlimits[1])
andlimits[2]
which are the same for each row.