rstudio / rmarkdown-book

R Markdown: The Definitive Guide (published by Chapman & Hall/CRC in July 2018)
https://bookdown.org/yihui/rmarkdown
Other
774 stars 512 forks source link

Error building the book. #105

Closed icejean closed 1 year ago

icejean commented 1 year ago

Hi,大家好, 最近在学习R markdown,了解到这本正在写作中的书,下载了项目尝试build一下,有几个小问题反馈一下。 1、 01-intro.Rmd 1)、images/01-notebook-preview.jpg应改为images/01-notebook-preview.png,并重命名文件, png格式。

knitr::include_graphics("images/01-notebook-preview.png")

2、images/01-dynamic-document.jpg应改为images/01-dynamic-document.png,并重命名文件, png格式。

knitr::include_graphics("images/01-dynamic-document.png")

2、build HTML与word都可以,但build PDF出错,不知到写作团队测试过build PDF没有。我是菜鸟,还无法定位解决问题。不过知道PDF中laTeX数学公式等的效果比Word要方便很多和好很多。 ···

sucess

bookdown::render_book('index.Rmd',"bookdown::word_document2")

Failed

bookdown::render_book('index.Rmd',"bookdown::pdf_book") ··· Error message:

Error in seq.default(dots[[1L]][[5L]], dots[[2L]][[5L]]) : 
  'to' must be a finite number
In addition: Warning messages:
1: `guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead. 
2: In system2("python", c("-c", shQuote(code)), stdout = TRUE) :
  running command '"python" -c "print(1 + 1)"' had status 9009
3: In eval_asy() :
  System set-up not compatible with Asymptote, so chunks with asy engine will be skipped.
4: In eval_asy() :
  System set-up not compatible with Asymptote, so chunks with asy engine will be skipped.
5: In png::readPNG(path, native = TRUE, info = TRUE) :
  Image uses 16-bit channels but R native format only supports 8-bit, truncating LSB.
6: In knitr::write_bib(c(.packages(), "bookdown", "knitr", "rmarkdown",  :
  package(s) flextable, gt, gtsummary, formattable, reactable, rhandsontable, pixiedust, stargazer, tables, tangram, ztable, condformat, printr, styler, ezknitr, rmdformats, learnr, blogdown, spelling, blastula, workflowr, xaringanthemer, diagram, rmdrive, xaringanExtra, fusen not found
7: In utils::citation(..., lib.loc = lib.loc) :
  no date field in DESCRIPTION file of package 'datadrivencv'
8: In utils::citation(..., lib.loc = lib.loc) :
  could not determine year for 'datadrivencv' from package DESCRIPTION file
9: In utils::citation(..., lib.loc = lib.loc) :

 Error in seq.default(dots[[1L]][[5L]], dots[[2L]][[5L]]) : 
  'to' must be a finite number 
yihui commented 1 year ago

你发错地盘了,应该发到这里:https://github.com/cosname/rmarkdown-guide/issues 谢谢。

icejean commented 1 year ago

Sorry,同时打开了几本R markdown的书和项目,乌龙发错项目了。