Quitting from lines 7917-7918 [unnamed-chunk-221] (rmarkdown-guide.Rmd)
Error:
! object 'v_spaces' not found
Warning message:
In system2("python3", c("-c", shQuote(code)), stdout = TRUE) :
running command '"python3" -c "print(1 + 1)"' had status 9009
Execution halted
Error: bookdown::render_book() failed to render the output format 'bookdown::gitbook'.
Execution halted
Error: Failed to compile the book to all
Execution halted
Error in render_book_script(output_format, envir, quiet) :
Error 1 attempting to render book
Calls: -> -> in_dir -> render_book_script
Execution halted
Exited with status 1.
- Possible solution:
use `strrep(' ', c(1,3,6,0))` instead.
- Chinese summary 简中梗概:
由于`v_spaces`函数已被废弃,章节 6.4.2 向源代码中添加行号 编译失败。通过查 knitr 源码[变更](https://github.com/yihui/knitr/commit/c98b1548b1ceb30d3f84aa908494f20126003649#diff-8ad583a41c5b62767d4a6deaf61d81980705cbb60852f7280c7de9e939c8b532R493-R494) 可知,使用`strrep`函数是knitr作者的选择。`strrep(' ', c(1,3,6,0))`的编译结果与原文效果一致。
knitr:::v_spaces(c(1, 3, 6, 0))
v_spaces
has been removed in v1.41.Quitting from lines 7917-7918 [unnamed-chunk-221] (rmarkdown-guide.Rmd) Error: ! object 'v_spaces' not found Warning message: In system2("python3", c("-c", shQuote(code)), stdout = TRUE) : running command '"python3" -c "print(1 + 1)"' had status 9009 Execution halted Error: bookdown::render_book() failed to render the output format 'bookdown::gitbook'. Execution halted Error: Failed to compile the book to all Execution halted Error in render_book_script(output_format, envir, quiet) : Error 1 attempting to render book Calls: -> -> in_dir -> render_book_script
Execution halted
Exited with status 1.