click: click

Description Usage Examples

View source: R/tally.R

Description

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.

Usage

1

Examples

 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, ])

gcfrench/tallyr documentation built on Oct. 8, 2019, 5:17 p.m.