Pushes a chunks stack to global chunks
chunks_push_chunks.Rd
Usage
chunks_push_chunks(x, overwrite = FALSE, chunks = get_chunks_object())
Arguments
- x
(
chunks
) stack object- overwrite
optional, (
logical
) Whether to ignore conflicts between the two chunk environments and use the added one as default- chunks
optional, (
chunks
) object. If not provided then automaticchunks
object detection is run via get_chunks_object
Examples
chunks_object <- chunks_new()
chunks_push(chunks = chunks_object, expression = bquote(x <- 1))
chunks_object2 <- chunks_new()
chunks_push(chunks = chunks_object2, expression = bquote(y <- 1))
chunks_push_chunks(chunks = chunks_object, x = chunks_object2)
chunks_get_rcode(chunks_object)
#> chunk_1 chunk_1_XDGRL
#> "x <- 1" "y <- 1"