This function adds or subtracts one from the counter depending on the tally counter type used, defined within the tally_counter function. It returns the number padded to a minimum of four characters. Once counter has finished the environment and counter object are removed.
1 | click()
|
1 2 3 4 5 6 7 8 9 10 | # Use default decreasing count setting
iris_three <- iris[1:5, ]
tally_counter(iris_three)
sepal_length <- function(x) {
message(paste0(click(), ": The sepal length is ", as.numeric(x[, "Sepal.Length"])), " cm")
Sys.sleep(0.25)
}
sepal_length(iris_three[1, ])
sepal_length(iris_three[2, ])
sepal_length(iris_three[3, ])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.