ds_measures_location: Measures of location

Description Usage Arguments Examples

View source: R/ds-describe.R

Description

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

Usage

1
ds_measures_location(data, ..., trim = 0.05, decimals = 2)

Arguments

data

A data.frame or tibble or numeric vector.

...

Column(s) in data or numeric vectors.

trim

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

decimals

An option to specify the exact number of decimal places to use. The default number of decimal places is 2.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# single column
ds_measures_location(mtcarz, mpg)

# multiple columns
ds_measures_location(mtcarz, mpg, disp)

# all columns
ds_measures_location(mtcarz)

# vector
ds_measures_location(mtcarz$mpg)

# vectors of different length
disp <- mtcarz$disp[1:10]
ds_measures_location(mtcarz$mpg, disp)

# decimal places
ds_measures_location(mtcarz, disp, hp, decimals = 3)

rsquaredacademy/descriptr documentation built on July 9, 2021, 8:13 p.m.