I'm doing a LaTex document using RStudio in Windows 7 by using knitr. I've have some problems such as:
When I use xtable() for these data frames , I just can get the code for Latex, is it possible to get directly the Latex format of tables in my pdf?
Related
When I knit the R Markdown document, my tables (created in kableExtra) show up if I do not save them (using save_kable [saving to PDF]). However if I save them, the tables are no longer rendered and shown in the R Markdown document. Is there a way to stop this from happening?
I use rstudio to write r-markdown, but sometimes it is not compatible with markdown support by pandoc(math for example. If there is a way allow me to convert r-markdown to pandoc markdown, then it will be convenient to export my articles to pdf, org, rts, latex...
https://pandoc.org/ also seems doesn't mention rmarkdown support.
I have tried to export .html form rstudio and use pandoc convert the html file back to markdown, but it seems doesn't work.
Actually pandoc is used to create pdf and other formats from r-markdown. Therefore there is an intermediate file with pandoc compatible markdown. You could retain this file by:
rmarkdown::render("document.Rmd", output_format = "pdf_document", run_pandoc = FALSE)
I'm trying to produce a word document with R markdown. Usually i'm creating pdf-files with no problems. I use Latex syntax to create accents for characters for normal text like:
$\'{e}\'{e}$n
And then it produces "één" correctly when i knit my pdf. But this doesn't seem to work when i knit a word document, it will just show "$\'{e}\'{e}$n". So no good. Does anyone know how to solve this problem? Thanks!
How can I get a DataFrame in a Julia Notebook to output to a pdf with nbconvert and control the formatting like with knitr::kable or pander tables in an R-markdown document?
Julia notebook:
the following code cell
using DataFrames
A = DataFrame(randn(10, 7))
the pdf from nbconvert shows 10Œ7 DataFrames.DataFrame followed by an un-formatted table. Although display(A) and print(A) show different outputs in the notebook, the pdf from nbconvert shows the same output as the code cell above does in the notebook.
With the Python Markdown Notebook Extension, the following markdown cells display the table in the notebook, but in the nbconvert generated pdf, the DataFrame turns into a one dimensional array.
Test1
{{A}}
Test2
| |
|------|
|{{A}}|
How can I get output like kable or pander tables in a knitted R-markdown doc in a pdf from a Julia Notebook with nbconvert?
Also on Github.
From Github discussion, nbconvert cannot read the Markdown Notebook Extension html output. Tables should be output from code cells so nbconvert can output them to TeX -> pdf.
The next follow-on question about which Julia functions can do this best is on StackOverflow
I am trying to print xtable in using knitr in word document as follows:
library(knitr)
library(xtable)
p1<-xtable(head(iris), include.rownames=FALSE, floating=FALSE)
print(p1)
I get this error, any ideas:
latex table generated in R 3.2.2 by xtable 1.7-4 package % Mon Oct 26 11:17:22 2015
I don't think you can do this with the standard word_document that comes with rmarkdown. xtable only produces output in HTML and LaTeX formats. To render a word document, your table has to be prepared in markdown format (so far as I know).
Some alternative options are to use knitr::kable or the pixiedust package.
If you're comfortable downloading things from GitHub, you may also use devtools::install_github("gforge/Grmd") and then replace output:word_document with output: Grmd::docx_document. Then using print.xtable with type = 'html' will render to an HTML document that can be opened as a docx.