# NOT RUN {
# Generate data for the example
carseats <- ISLR::Carseats
carseats[sample(seq(NROW(carseats)), 20), "Income"] <- NA
carseats[sample(seq(NROW(carseats)), 5), "Urban"] <- NA
find_outliers(carseats)
find_outliers(carseats, index = FALSE)
find_outliers(carseats, rate = TRUE)
## using dplyr -------------------------------------
library(dplyr)
# Perform simple data quality diagnosis of variables with outliers.
carseats %>%
select(find_outliers(.)) %>%
diagnose()
# }
Run the code above in your browser using DataLab