Learn R Programming

descriptr (version 0.6.1)

ds_percentiles: Percentiles

Description

Returns the percentiles

Usage

ds_percentiles(data, ..., decimals = 2)

Arguments

data

A data.frame or tibble.

...

Column(s) in data.

decimals

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

Details

n reports the number of non-missing observations and the percentiles are computed from the non-missing values, for both vector and data-frame input. A variable with no non-missing observations returns n = 0 and NA for every percentile.

Examples

Run this code
# single column
ds_percentiles(mtcarz, mpg)

# multiple columns
ds_percentiles(mtcarz, mpg, disp)

# all columns
ds_percentiles(mtcarz)

# vector
ds_percentiles(mtcarz$mpg)

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

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

Run the code above in your browser using DataLab