data <- data.frame(strength = c(80, 98, 96, 97, 98, 120))
m <- maximum_normed_residual(data, strength)
# augment can be called with the original data
augment(m, data)
## strength .outlier
## 1 80 FALSE
## 2 98 FALSE
## 3 96 FALSE
## 4 97 FALSE
## 5 98 FALSE
## 6 120 FALSE
# or augment can be called without the orignal data and it will be
# reconstructed
augment(m)
## # A tibble: 6 x 2
## values .outlier
##
## 1 80 FALSE
## 2 98 FALSE
## 3 96 FALSE
## 4 97 FALSE
## 5 98 FALSE
## 6 120 FALSE
Run the code above in your browser using DataLab