R/pm.R

Defines functions pm

Documented in pm

#' Paste for message
#'
#' Combines the base functions paste0 and message
#'
#' @param ... one or more R objects, to be converted to character vectors.
#' Input(s) to this argument will be passed onto the paste0 function.
#' @param collapse an optional character string to separate the results.
#' Not `NA_character_`. Input(s) to this argument will be passed onto
#' the paste0 function.
#' @return there will be no output from this function. Rather, a message
#' will be generated from the arguments.
#' @examples
#' pm("hello", 123)
#' pm(c("hello", 123), collapse = ", ")
#' @export
pm <- function(
  ...,
  collapse = NULL) {
  message(paste0(list(...), collapse))
}

Try the kim package in your browser

Any scripts or data that you put into this service are public.

kim documentation built on Oct. 9, 2023, 5:08 p.m.