powered by
If tidy = TRUE constructs a tidyverse style message by
tidy = TRUE
message_chk(..., n = NULL, tidy = TRUE)
A string of the message.
Multiple objects that are converted to a string using paste0(..., collapse = '').
paste0(..., collapse = '')
The value of n for converting sprintf-like types.
sprintf
A flag specifying whether capitalize the first character and add a missing period.
The following recognized sprintf-like types can be used in a message:
n
The value of n.
s
'' if n == 1 otherwise 's'
r
'is' if n == 1 otherwise 'are'
y
'y' if n == 1 otherwise 'ie'
Capitalizing the first character if possible.
Adding a trailing . if missing.
Also if n != NULL replaces the recognized sprintf-like types.
n != NULL
message_chk("there %r %n", " problem director%y%s") message_chk("there %r %n", " problem director%y%s", n = 1) message_chk("There %r %n", " problem director%y%s.", n = 3)
Run the code above in your browser using DataLab