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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: rdocx_document
> ### Title: Advanced R Markdown Word Format
> ### Aliases: rdocx_document
> 
> ### ** Examples
> 
> library(rmarkdown)
> run_ok <- pandoc_available() &&
+   pandoc_version() >= numeric_version("2.0")
> 
> if(run_ok){
+ 
+ # minimal example -----
+ example <- system.file(package = "officedown",
+   "examples/minimal_word.Rmd")
+ rmd_file <- tempfile(fileext = ".Rmd")
+ file.copy(example, to = rmd_file)
+ 
+ docx_file_1 <- tempfile(fileext = ".docx")
+ render(rmd_file, output_file = docx_file_1, quiet = TRUE)
+ 
+ # bookdown example -----
+ 
+ bookdown_loc <- system.file(package = "officedown", "examples/bookdown")
+ 
+ temp_dir <- tempfile()
+ # uncomment next line to get the result in your working directory
+ # temp_dir <- "./bd_example"
+ 
+ dir.create(temp_dir, showWarnings = FALSE, recursive = TRUE)
+ file.copy(
+   from = list.files(bookdown_loc, full.names = TRUE),
+   to = temp_dir,
+   overwrite = TRUE, recursive = TRUE)
+ 
+ render_site(
+   input = temp_dir, encoding = 'UTF-8',
+   envir = new.env(), quiet = TRUE)
+ 
+ docx_file_2 <- file.path(temp_dir, "_book", "bookdown.docx")
+ 
+ if(file.exists(docx_file_2)){
+   message("file ", docx_file_2, " has been written.")
+ }
+ }


processing file: bookdown.Rmd
   inline R code fragments

label: unnamed-chunk-1 (with options) 
List of 1
 $ include: logi FALSE

   inline R code fragments

label: unnamed-chunk-2 (with options) 
List of 1
 $ eval: logi FALSE

  ordinary text without R code

label: unnamed-chunk-3
  ordinary text without R code

label: unnamed-chunk-4
  ordinary text without R code

label: unnamed-chunk-5 (with options) 
List of 1
 $ include: logi FALSE

  ordinary text without R code

label: unnamed-chunk-6 (with options) 
List of 3
 $ tab.cap     : chr "mtcars"
 $ tab.id      : chr "mtcars"
 $ first_column: logi TRUE

  ordinary text without R code

label: unnamed-chunk-7 (with options) 
List of 4
 $ tab.cap     : chr "iris"
 $ tab.id      : chr "iris"
 $ no_hband    : logi TRUE
 $ first_column: logi FALSE

  ordinary text without R code

label: unnamed-chunk-8 (with options) 
List of 2
 $ tab.cap: chr "flextable"
 $ tab.id : chr "flextable"

   inline R code fragments

label: unnamed-chunk-9 (with options) 
List of 6
 $ echo      : logi FALSE
 $ fig.cap   : chr "sin function"
 $ fig.id    : chr "sinus"
 $ fig.width : num 6
 $ fig.height: num 4
 $ fig.align : chr "center"

   inline R code fragments

label: unnamed-chunk-10
  ordinary text without R code

label: unnamed-chunk-11
  ordinary text without R code

label: unnamed-chunk-12 (with options) 
List of 3
 $ fig.cap      : chr "economics plot"
 $ fig.id       : chr "ts-plot"
 $ fig.cap.style: chr "Image Caption"

  ordinary text without R code

label: unnamed-chunk-13 (with options) 
List of 2
 $ fig.cap: chr "$\\sum_{i=1}^n X_i$"
 $ fig.id : chr "dotplot"

  ordinary text without R code

output file: bookdown.knit.md

pandoc-citeproc: Error in $: Incompatible API versions: encoded with [1,20] but attempted to decode with [1,17,5,4].
CallStack (from HasCallStack):
  error, called at ./Text/Pandoc/JSON.hs:111:48 in pandoc-types-1.17.5.4-5tHZ3B61A58JaKOMxwGQR4:Text.Pandoc.JSON
Error running filter /usr/bin/pandoc-citeproc:
Filter returned error status 1
Error: pandoc document conversion failed with error 83
Warning in file.remove(intermediate_html) :
  cannot remove file 'bookdown.utf8.tmp.html', reason 'No such file or directory'
Execution halted