Running examples in ‘knitrdata-Ex.R’ failed
The error most likely occurred in:

> ### Name: create_chunk
> ### Title: Tools for creating (data) chunks and inserting them into
> ###   Rmarkdown documents
> ### Aliases: create_chunk insert_chunk
> 
> ### ** Examples
> 
> # Use a temporary directory ----------------------------
> owd = getwd()
> td = tempdir(check=TRUE)
> setwd(td)
> 
> # Test --------------
> library(knitrdata)
> library(magrittr) # For pipe operator
> 
> # Create new Rmarkdown document
> if (file.exists("test.create_chunks.Rmd"))
+   file.remove("test.create_chunks.Rmd")
> rmarkdown::draft("test.create_chunks.Rmd","github_document","rmarkdown",
+                  edit=FALSE)
> 
> # Create some binary data
> x = data.frame(a=1:10,b=(1:10)^2)
> saveRDS(x,"test.create_chunks.RDS")
> 
> # Push chunks into Rmarkdown document
> # Insert in reverse order to not have to figure out line number
> txt = create_chunk("x\nplot(b~a,data=x)",chunk_type="r") %>%
+   insert_chunk(11,rmd.file="test.create_chunks.Rmd")
> txt = data_encode("test.create_chunks.RDS","base64") %>%
+   create_chunk(output.var="x",format="binary",loader.function=readRDS) %>%
+   insert_chunk(11,txt)
> txt = create_chunk("library(knitrdata)",chunk_type="r") %>%
+   insert_chunk(11,txt)
> 
> writeLines(txt,"test.create_chunks.Rmd")
> 
> # List all chunks in documents
> chunklst = list_rmd_chunks(file="test.create_chunks.Rmd")
> chunklst
  type    label start end
1    r    setup     6   8
2    r             11  13
3 data             14  20
4    r             21  24
5    r     cars    32  34
6    r pressure    40  42
> 
> # Remove the pressure chunk
> xx = split_rmd_by_chunk(file="test.create_chunks.Rmd",chunk_label="pressure")
> txt = c(xx$pre_chunk,xx$post_chunk)
> writeLines(txt,"test.create_chunks.Rmd")
> 
> # List chunks again
> chunklst = list_rmd_chunks(file="test.create_chunks.Rmd")
> chunklst
  type label start end
1    r setup     6   8
2    r          11  13
3 data          14  20
4    r          21  24
5    r  cars    32  34
> 
> # Render document to test
> rmarkdown::render("test.create_chunks.Rmd")
Error: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).
Execution halted