Creates a series of R markdown code chunks that print the x object.

create_chunks(length)

Arguments

length

(integer)
integer specifying the number of code chunks to create.

Value

Code chunk character vector

Examples

create_chunks(2L) |>
  cat(sep = "\n")
#> ```{r}
#> x[[1]]
#> ```
#> 
#> \newpage
#> 
#> ```{r}
#> x[[2]]
#> ```