Skip to contents

[Stable]

Usage

chunks_push_comment(comment, chunks = get_chunks_object())

Arguments

comment

(codecharacter) Comment to be inserted into the Show-R code.

chunks

optional, (chunks) object. If not provided then automatic chunks object detection is run via get_chunks_object

Examples

all_chunks <- chunks_new()
chunks_push_comment("this is a comment", chunks = all_chunks)

chunks_get_rcode(chunks = all_chunks) == "# this is a comment"
#> chunk_1 
#>    TRUE