I have an error in rmarkdown using Pandoc's Markdown "tables" as shown in rmarkdown-2.0 cheat sheet with pdf markdown which doesn't appear html or word markdown. What am I doing wrong? How do I fix it.
my session information is:
R version 3.6.2 (2019-12-12)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
 LC_COLLATE=English_United States.1252
 LC_CTYPE=English_United States.1252
 LC_MONETARY=English_United States.1252
 LC_TIME=English_United States.1252
attached base packages:
 stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
 compiler_3.6.2 magrittr_1.5 tools_3.6.2 htmltools_0.4.0
 yaml_2.2.0 Rcpp_1.0.3 stringi_1.4.5 rmarkdown_2.0
 knitr_1.27 stringr_1.4.0 xfun_0.12 digest_0.6.23
 rlang_0.4.2 evaluate_0.14
The following code works fine with html, and word markdown:
title: "An All Possible Models Procedure"
author: "Peter B. Mandeville"
r format(Sys.time(),'%I:%M %p %d %B %Y')"
latex_engine : pdflatex #xelatex
knitr::opts_chunk$set(echo = TRUE)
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
You can also embed plots, for example:
Note that the
echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.
This is a test
|AIC||Akaike's Information Criterion|
|BIC||Bayesian Information Criterion|
|D||Discrimination index — likelihood ratio χ2 divided by the sample size|
|Dxy||Dxy:Somers’ rank correlation between predicted probability that Y = 1 vs. the binary Y values. This equals 2(C − 0.5) where C is the “ROC Area or concordance probability|
|EDA||Exploratory Data Analysis|
However, it produces an error in pdf markdown
This is the error message:
output file: test-error2.knit.md
! Missing number, treated as zero.
Error: LaTeX failed to compile test-error2.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See test-error2.log for more info.
What am I doing wrong? How do I fix it?
Thank you very much.