Learn R Programming

formods (version 0.2.1)

FM_build_comment: 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)

Value

Formatted comment.

Arguments

level

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

comment_str

Character object.

Examples

Run this code
FM_build_comment(1, "This is a level 1 header")

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

Run the code above in your browser using DataLab