- Plot the data and identify outliers.
- If required, remove outliers.
# Functions
library(dplyr)
Extract observations of
mtcars$hp
above 300 (outliers).
M.age.outliers <- mtcars %>% filter(mtcars$hp > 300)
Remove observations of
mtcars$hp
above 300 (outliers).
M.age.wo <- mtcars %>% filter(mtcars$hp <= 300)