table_decreasing | R Documentation |
This function generates a frequency table of the input vector vec
and allows the option
to sort the table in decreasing or increasing order. It handles NA values.
table_decreasing(vec, decreasing = TRUE, useNA = "ifany")
vec |
A vector. The vector for which the frequency table is to be generated. |
decreasing |
Logical. Should the table be sorted in decreasing order? Default: |
useNA |
A string. Specifies how to handle NA values. Can be "ifany", "always", or "no".
Default: |
A frequency table sorted based on the decreasing
argument.
vec <- c(1, 2, 2, NA, 3, 3, 3)
table_decreasing(vec)
table_decreasing(vec, decreasing = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.