Last chance! 50% off unlimited learning
Sale ends in
Frequency table for categorical and continuous data and returns the
frequency, cumulative frequency, frequency percent and cumulative frequency
percent. plot.ds_freq_table()
creates bar plot for the categorical
data and histogram for continuous data.
ds_freq_table(data, variable, bins = 5)# S3 method for ds_freq_table
plot(x, print_plot = TRUE, ...)
A data.frame
or a tibble
.
Column in data
.
Number of intervals into which the data must be split.
An object of class ds_freq_table
.
logical; if TRUE
, prints the plot else returns a plot object.
Further arguments to be passed to or from methods.
# NOT RUN {
# categorical data
ds_freq_table(mtcarz, cyl)
# barplot
k <- ds_freq_table(mtcarz, cyl)
plot(k)
# continuous data
ds_freq_table(mtcarz, mpg)
# barplot
k <- ds_freq_table(mtcarz, mpg)
plot(k)
# }
Run the code above in your browser using DataLab