Returns the measures of location such as mean, median & mode.

ds_measures_location(data, ..., trim = 0.05)

Arguments

data

A data.frame or tibble.

...

Column(s) in data.

trim

The fraction of values to be trimmed before computing the mean.

Examples

ds_measures_location(mtcarz)
#> # A tibble: 6 x 5 #> var mean trim_mean median mode #> <chr> <dbl> <dbl> <dbl> <dbl> #> 1 disp 231. 228 196. 276. #> 2 drat 3.60 3.58 3.70 3.07 #> 3 hp 147. 144. 123 110 #> 4 mpg 20.1 20.0 19.2 10.4 #> 5 qsec 17.8 17.8 17.7 17.0 #> 6 wt 3.22 3.20 3.32 3.44
ds_measures_location(mtcarz, mpg)
#> # A tibble: 1 x 5 #> var mean trim_mean median mode #> <chr> <dbl> <dbl> <dbl> <dbl> #> 1 mpg 20.1 20.0 19.2 10.4
ds_measures_location(mtcarz, mpg, disp)
#> # A tibble: 2 x 5 #> var mean trim_mean median mode #> <chr> <dbl> <dbl> <dbl> <dbl> #> 1 disp 231. 228 196. 276. #> 2 mpg 20.1 20.0 19.2 10.4