View source: R/count_cumulative.R
h_count_cumulative | R Documentation |
s_count_cumulative()
Helper function to calculate count and fraction of x
values in the lower or upper tail given a threshold.
h_count_cumulative(
x,
threshold,
lower_tail = TRUE,
include_eq = TRUE,
na_rm = TRUE,
denom
)
x |
( |
threshold |
( |
lower_tail |
( |
include_eq |
( |
na_rm |
( |
denom |
(
|
A named vector with items:
count
: the count of values less than, less or equal to, greater than, or greater or equal to a threshold
of user specification.
fraction
: the fraction of the count.
count_cumulative
set.seed(1, kind = "Mersenne-Twister")
x <- c(sample(1:10, 10), NA)
.N_col <- length(x)
h_count_cumulative(x, 5, denom = .N_col)
h_count_cumulative(x, 5, lower_tail = FALSE, include_eq = FALSE, na_rm = FALSE, denom = .N_col)
h_count_cumulative(x, 0, lower_tail = FALSE, denom = .N_col)
h_count_cumulative(x, 100, lower_tail = FALSE, denom = .N_col)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.