Skip to contents

[Deprecated] Chunks are being deprecated qenv objects should be used instead

Usage

chunks_push(expression, id = NULL, chunks = get_chunks_object())

Arguments

expression

(call) Expression that contains a function call.

id

optional, (character) ID given for the code chunk

chunks

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

Value

Nothing, just add the chunk to the chunks argument

Examples

all_chunks <- chunks_new()
chunks_push(chunks = all_chunks, expression = call("as.character", x = 3), id = "tbl")

x <- 3
chunks_push(chunks = all_chunks, expression = quote(as.character(x)), id = "tbl2")