View source: R/count_bindings.R
set_numeric_threshold | R Documentation |
In certain tables, it may be necessary to only include rows that meet numeric conditions. Rows that are less than a certain cutoff can be suppressed from the output. This function allows you to pass a cutoff, a cutoff stat(n, distinct_n, pct, or distinct_pct) to supress values that are lesser than the cutoff.
set_numeric_threshold(e, numeric_cutoff, stat, column = NULL)
e |
A |
numeric_cutoff |
A numeric value where only values greater than or equal to will be displayed. |
stat |
The statistic to use when filtering out rows. Either 'n', 'distinct_n', or 'pct' are allowable |
column |
If only a particular column should be used to cutoff values, it can be supplied here as a character value. |
The modified Tplyr layer object
mtcars %>%
tplyr_table(gear) %>%
add_layer(
group_count(cyl) %>%
set_numeric_threshold(10, "n") %>%
add_total_row() %>%
set_order_count_method("bycount")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.