pre_post_stats | R Documentation |
The method exported only for custom extensions use.
'.pre_post_stats' returns the statistics having html tags structure. '.pre_post_stats_text' returns the same output but flatten to a single character object. The latter function works faster and supports vector arguments.
.pre_post_stats(
current,
previous,
name,
brackets = FALSE,
percent = FALSE,
stats = c("pre", "post")
)
.pre_post_stats_text(
current,
previous,
name,
brackets = TRUE,
percent = FALSE,
stats = c("pre", "post")
)
current |
Current step statistic value. |
previous |
Previous step statistic value. |
name |
Name displayed nearby the statistics output. |
brackets |
If TRUE, statistics will be displayed in brackets. |
percent |
Should current/previous ration in percentages be displayed? |
stats |
Vector of "pre" and "post" defining which statistics should be returned. "pre" for previous, "post" for current and NULL for none. |
A 'shiny.tag' class 'span' object defining html structure of data/value statistics, or character object.
.pre_post_stats(5, 10, "books")
.pre_post_stats_text(5, 10, "books")
.pre_post_stats(5, 10, "books", brackets = TRUE)
.pre_post_stats_text(5, 10, "books", brackets = TRUE)
.pre_post_stats(5, 10, "books", percent = TRUE)
.pre_post_stats_text(5, 10, "books", percent = TRUE)
.pre_post_stats_text(5:6, 10:11, "books", percent = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.