I am trying to produce a pdf report of a dataframe named "mydata" using the DataExplorer package. Nevertheless I get the following Error: Failed to compile D:/Documents/R/R projects/ENDO/report.tex.
I have tried to see if any error occurs with tinytex using:
options(tinytex.verbose = TRUE)
devtools::install_github('yihui/tinytex')
But no error was detected.
Here is the initial code I used:
options(tinytex.verbose = TRUE)
DataExplorer::create_report(mydata, output_format = "pdf_document")
And here is the output:
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.
Any suggestions?
[Updates as of 2019/03/19]
With the latest version on CRAN (v0.8), I am able to generate a PDF report with the following code:
create_report(
data = iris,
output_format = pdf_document(),
output_file = "report.pdf",
config = configure_report(add_plot_str = FALSE)
)
[Outdated Answer]
I believe the JavaScript code in plot_str
is causing the error, since PDF is static document. I am able to generate a PDF report using the following code:
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()
)
)