Learn R Programming

descriptr (version 0.4.1)

ds_freq_table: Frequency table

Description

Frequency table for factor data and returns the frequency, cumulative frequency, frequency percent and cumulative frequency percent. barplot.ds_freq_table() creates bar plot for the frequency table created using ds_freq_table().

Usage

ds_freq_table(data, variable)

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

Arguments

data

A data.frame or a tibble.

variable

Column in data.

x

An object of class ds_freq_table.

...

Further arguments to be passed to or from methods.

Value

ds_freq_table returns an object of class "ds_freq_table". An object of class "ds_freq_table" is a list containing the following components:

ftable

Frequency table.

Deprecated function

freq_table() has been deprecated. Instead use ds_freq_table().

See Also

ds_freq_cont ds_cross_table

Examples

Run this code
# NOT RUN {
# frequency table
ds_freq_table(mtcarz, cyl)

# barplot
k <- ds_freq_table(mtcarz, cyl)
plot(k)

# }

Run the code above in your browser using DataLab