Skip to content

Commit

Permalink
Merge pull request #65 from randrescastaneda/fix-storemsg-doc
Browse files Browse the repository at this point in the history
Fix storemsg doc
  • Loading branch information
randrescastaneda authored Jun 11, 2024
2 parents 02cc0b7 + 5f1ed7e commit 8a574db
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 17 deletions.
27 changes: 19 additions & 8 deletions R/info_display.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,32 @@ store_msg <- function(type, ...) {
#' @param info A character string representing an info message to be stored. Default value is NULL
#'
#' @section Hot to pass the message string:
#' The function allows for the customization of the message string using {cli} classes to emphasize specific components of the message
#' The function allows for the customization of the message string using cli classes to emphasize specific components of the message
#' Here's how to format the message string:
#' *For variables: .strongVar --example: "{.strongVar {reportvar}}"
#' *For function arguments: .strongArg --example: "{.strongArg {y_vars_to_keep}}"
#' *For dt/df: .strongTable --example: "{.strongTable x}"
#' *For text/anything else: .strong --example: "reportvar is {.strong NOT} returned"
#' *For variables: .strongVar
#' *For function arguments: .strongArg
#' *For dt/df: .strongTable
#' *For text/anything else: .strong
#' *NOTE: By default, the number of seconds specified in timing messages is
#' automatically emphasized using a custom formatting approach.
#' You do not need to apply {cli} classes nor to specify that the number is in seconds.
#' --example usage: store_joyn_msg(timing =
#' paste("The full joyn is executed in", round(time_taken, 6)))
#' You do not need to apply cli classes nor to specify that the number is in seconds.
#'
#'
#'
#' @return invisible TRUE
#'
#' @examples
#' # Timing msg
#' joyn:::store_joyn_msg(timing = paste(" The entire joyn function, including checks,
#' is executed in ", round(1.8423467, 6)))
#'
#' # Error msg
#' joyn:::store_joyn_msg(err = " Input table {.strongTable x} has no columns.")
#'
#' # Info msg
#' joyn:::store_joyn_msg(info = "Joyn's report available in variable {.strongVar .joyn}")
#'
#'
#' @keywords internal
store_joyn_msg <- function(err = NULL,
warn = NULL,
Expand Down
2 changes: 1 addition & 1 deletion man/freq_table.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 19 additions & 8 deletions man/store_joyn_msg.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8a574db

Please sign in to comment.