Skip to contents

remove outliers and NA

Usage

remove_outliers(df, col, .by = NULL)

Arguments

df

tibble

col

columns to remove outliers

.by

group by

Value

tibble

Examples

remove_outliers(mini_diamond, price)
#> # A tibble: 93 × 7
#>    id    carat cut   clarity price     x     y
#>    <chr> <dbl> <chr> <chr>   <int> <dbl> <dbl>
#>  1 id-1   1.02 Fair  SI1      3027  6.25  6.18
#>  2 id-3   0.52 Ideal VVS1     2029  5.15  5.18
#>  3 id-4   1.54 Ideal SI2      9452  7.43  7.45
#>  4 id-5   0.72 Ideal VS1      2498  5.73  5.77
#>  5 id-7   0.27 Good  VVS1      752  4.1   4.07
#>  6 id-8   0.51 Good  SI2      1029  5.05  5.08
#>  7 id-9   1.01 Ideal SI1      5590  6.43  6.4 
#>  8 id-10  0.7  Fair  VVS1     1691  5.56  5.41
#>  9 id-11  1.02 Good  VVS1     7861  6.37  6.4 
#> 10 id-12  0.71 Fair  IF       3205  5.87  5.81
#> # ℹ 83 more rows