descriptr (version 0.3.0)

ds_freq_table: Frequency Table: Categorical Data

Description

ds_freq_table creates 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)

# S3 method for ds_freq_table barplot(height, ...)

Arguments

data

numeric or factor vector

height

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

varname

name of the data

Deprecated Function

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

See Also

link{ds_freq_cont} link{ds_cross_table}

Examples

Run this code
# NOT RUN {
# frequency table
mt <- mtcars
mt$cyl <- as.factor(mt$cyl)
ds_freq_table(mt$cyl)

# barplot
mt <- mtcars
mt$cyl <- as.factor(mt$cyl)
k <- ds_freq_table(mt$cyl)
barplot(k)
# }

Run the code above in your browser using DataLab