FM_build_comment: Create RStudio Formatted Comments

View source: R/formods.R

FM_build_commentR Documentation

Create RStudio Formatted Comments

Description

Takes a character string and builds a comment so it will be formatted as a section at the specified level in RStudio

Usage

FM_build_comment(level = 1, comment_str)

Arguments

level

Integer (1 (default),2, or 3) indicating the section level of the comment.

comment_str

Character object.

Value

Formatted comment.

Examples

FM_build_comment(1, "This is a level 1 header")

FM_build_comment(2, paste0(rep("Long string repeated.", 5), collapse=" "))


formods documentation built on April 12, 2025, 1:57 a.m.