Pushes a code chunk for global chunks
chunks_push.Rd
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 automaticchunks
object detection is run via get_chunks_object
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")