# NOT RUN {
# select only mpg and disp (continuous)
mt1 <- mtcars[, c(1,3)]
# create some fake outliers and attach outliers to main df
mt2 <- rbind(mt1, data.frame(mpg = c(37, 40), disp = c(300, 400)))
# fit model with outliers
model <- lm(disp ~ mpg, data = mt2)
check_outliers(model)
# }
Run the code above in your browser using DataLab