Skip to content

Latest commit

 

History

History
21 lines (21 loc) · 683 Bytes

[M]-Outlier-Extraction-&-Removal-by-Observation.md

File metadata and controls

21 lines (21 loc) · 683 Bytes

Outlier Extraction & Removal by Observation

  1. Plot the data and identify outliers.
  2. If required, remove outliers.
Preparation Code
# Functions
library(dplyr)
Actual Code
Sample Task 1

Extract observations of mtcars$hp above 300 (outliers).

M.age.outliers <- mtcars %>% filter(mtcars$hp > 300)
Sample Task 2

Remove observations of mtcars$hp above 300 (outliers).

M.age.wo <- mtcars %>% filter(mtcars$hp <= 300)