Skip to contents

Print as comment

Usage

printComment(
  ...,
  prefix = c("##", "## >", "#'", "#' >", "#", "# >"),
  width = 80L
)

Arguments

...

Passthrough to print().

prefix

Comment prefix to use. RStudio, roxygen, and ESS prefixes are supported.

width

integer(1L). Desired output width. Defaults to 80 characters.

Value

Console output.

Note

Updated 2022-05-23.

Examples

printComment(c("hello", "world"))
#> ## [1] "hello" "world"