Frequency distribution of continuous data by splitting into equidistant intervals created based on the number of bins specified. hist.ds_freq_cont() creates histogram for the frequency table created using ds_freq_cont().

ds_freq_cont(data, variable, bins = 5)

# S3 method for ds_freq_cont
plot(x, ...)

Arguments

data

A data.frame or a tibble.

variable

Column in data.

bins

Number of intervals into which the data must be split.

x

An object of class ds_freq_cont.

...

Further arguments to be passed to or from methods.

Value

A tibble.

Deprecated functions

freq_cont() has been deprecated. Instead use ds_freq_cont().

See also

Examples

# frequency table ds_freq_cont(mtcarz, mpg, 4)
#> Variable: mpg #> |---------------------------------------------------------------------------| #> | Bins | Frequency | Cum Frequency | Percent | Cum Percent | #> |---------------------------------------------------------------------------| #> | 10.4 - 16.3 | 10 | 10 | 31.25 | 31.25 | #> |---------------------------------------------------------------------------| #> | 16.3 - 22.1 | 13 | 23 | 40.62 | 71.88 | #> |---------------------------------------------------------------------------| #> | 22.1 - 28 | 5 | 28 | 15.62 | 87.5 | #> |---------------------------------------------------------------------------| #> | 28 - 33.9 | 4 | 32 | 12.5 | 100 | #> |---------------------------------------------------------------------------| #> | Total | 32 | - | 100.00 | - | #> |---------------------------------------------------------------------------|
# histogram k <- ds_freq_cont(mtcarz, mpg, 4) plot(k)