首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >dataExplorer::create_report编译失败

dataExplorer::create_report编译失败
EN

Stack Overflow用户
提问于 2018-12-07 21:40:50
回答 1查看 473关注 0票数 1

我试图使用DataExplorer包生成一个名为"mydata“的数据数据的pdf报告。然而,我得到了以下错误:编译D:/Documents/R/R projects/ENDO/report.tex失败。

我试过使用以下方法查看tinytex是否发生了任何错误:

代码语言:javascript
复制
options(tinytex.verbose = TRUE)
devtools::install_github('yihui/tinytex')

但没有发现任何错误。

下面是我使用的初始代码:

代码语言:javascript
复制
options(tinytex.verbose = TRUE)
DataExplorer::create_report(mydata, output_format = "pdf_document")

这是输出:

代码语言:javascript
复制
processing file: report.rmd
  |..                                                               |   2%
  ordinary text without R code

  |...                                                              |   5%
label: global_options (with options) 
List of 1
 $ include: logi FALSE

  |.....                                                            |   7%
  ordinary text without R code

  |......                                                           |  10%
label: introduce
  |........                                                         |  12%
  ordinary text without R code

  |.........                                                        |  14%
label: plot_intro
  |...........                                                      |  17%
  ordinary text without R code

  |............                                                     |  19%
label: data_structure
  |..............                                                   |  21%
  ordinary text without R code

  |...............                                                  |  24%
label: missing_profile
  |.................                                                |  26%
  ordinary text without R code

  |...................                                              |  29%
label: univariate_distribution_header
  |....................                                             |  31%
  ordinary text without R code

  |......................                                           |  33%
label: plot_histogram
  |.......................                                          |  36%
  ordinary text without R code

  |.........................                                        |  38%
label: plot_density
  |..........................                                       |  40%
  ordinary text without R code

  |............................                                     |  43%
label: plot_frequency_bar
  |.............................                                    |  45%
  ordinary text without R code

  |...............................                                  |  48%
label: plot_response_bar
  |................................                                 |  50%
  ordinary text without R code

  |..................................                               |  52%
label: plot_with_bar
  |....................................                             |  55%
  ordinary text without R code

  |.....................................                            |  57%
label: plot_normal_qq
  |.......................................                          |  60%
  ordinary text without R code

  |........................................                         |  62%
label: plot_response_qq
  |..........................................                       |  64%
  ordinary text without R code

  |...........................................                      |  67%
label: plot_by_qq
  |.............................................                    |  69%
  ordinary text without R code

  |..............................................                   |  71%
label: correlation_analysis
  |................................................                 |  74%
  ordinary text without R code

  |..................................................               |  76%
label: principle_component_analysis
  |...................................................              |  79%
  ordinary text without R code

  |.....................................................            |  81%
label: bivariate_distribution_header
  |......................................................           |  83%
  ordinary text without R code

  |........................................................         |  86%
label: plot_response_boxplot
  |.........................................................        |  88%
  ordinary text without R code

  |...........................................................      |  90%
label: plot_by_boxplot
  |............................................................     |  93%
  ordinary text without R code

  |..............................................................   |  95%
label: plot_response_scatterplot
  |...............................................................  |  98%
  ordinary text without R code

  |.................................................................| 100%
label: plot_by_scatterplot

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS "D:/Documents/R/R projects/ENDO/report.utf8.md" --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc3a5c401d986.tex --template "C:\PROGRA~1\R\R-35~1.1\library\RMARKD~1\rmd\latex\DEFAUL~3.TEX" --highlight-style tango --latex-engine pdflatex --variable graphics=yes --variable "geometry:margin=1in" --variable "compact-title:yes" 

Error: Failed to compile D:/Documents/R/R projects/ENDO/report.tex.

有什么建议吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-12-10 15:08:41

更新截止2019/03/19

使用CRAN上的最新版本(v0.8),我能够生成一个PDF报告,代码如下:

代码语言:javascript
复制
create_report(
  data = iris,
  output_format = pdf_document(),
  output_file = "report.pdf",
  config = configure_report(add_plot_str = FALSE)
)

过时的答案

我相信JavaScript代码在plot_str中是导致错误的原因,因为PDF是静态文档。我能够使用以下代码生成PDF报告:

代码语言:javascript
复制
create_report(
    data = iris,
    output_format = "pdf_document",
    output_file = "report.pdf",
    config = list(
        "introduce" = list(),
        "plot_intro" = list(),
        "plot_missing" = list(),
        "plot_histogram" = list(),
        "plot_qq" = list(sampled_rows = 1000L),
        "plot_bar" = list(),
        "plot_correlation" = list("cor_args" = list("use" = "pairwise.complete.obs")),
        "plot_prcomp" = list()
    )
)
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53677122

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档