Skip to content

Commit

Permalink
Add examples in the documentation for no()
Browse files Browse the repository at this point in the history
  • Loading branch information
ramongss committed May 3, 2024
1 parent 1aa470c commit 560eaff
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions R/pluralize.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ make_quantity <- function(object) {
#' an expression that sets the pluralization quantity without printing
#' anything. See examples below.
#'
#' @examples
#' nfile <- 0; cli_text("Found {no(nfile)} file{?s}.")
#'
#' #> Found no files.
#'
#' nfile <- 1; cli_text("Found {no(nfile)} file{?s}.")
#'
#' #> Found 1 file.
#'
#' nfile <- 2; cli_text("Found {no(nfile)} file{?s}.")
#'
#' #> Found 2 files.
#'
#' @export
#' @family pluralization

Expand Down

0 comments on commit 560eaff

Please sign in to comment.