Learn R Programming

kim (version 0.5.3)

cum_percent_plot: Cumulative percentage plot

Description

Plots or tabulates cumulative percentages associated with elements in a vector

Usage

cum_percent_plot(vector, output_type = "plot")

Arguments

vector

a numeric vector

output_type

if output_type = "plot", return a cumulative percentage plot; if output_type = "dt", return a data.table with cumulative percentages. By default, output_type = "plot"

Examples

Run this code
# \donttest{
cum_percent_plot(c(1:100, NA, NA))
cum_percent_plot(mtcars$mpg)
cum_percent_plot(vector= mtcars$mpg, output_type = "dt")
# }

Run the code above in your browser using DataLab