r-markdown

multiple authors and subtitles in Rmarkdown yaml

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 15:47:24
I'm trying to follow this pandoc example to add multiple authors to an Rmarkdown file in the yaml metadata block . The pdf will generate in RStudio (Version 0.98.932), but there is no author information. --- title: 'This is the title: it contains a colon' author: - name: Author One affiliation: University of Somewhere - name: Author Two affiliation: University of Nowhere date: "`r format(Sys.time(), '%d %B %Y')`" tags: [nothing, nothingness] abstract: | This is the abstract. It consists of two paragraphs. output: pdf_document --- I'd also like to customize the heading a bit more and add a

How to get images from the .tex folder (relative path) in Rmarkdown?

萝らか妹 提交于 2019-12-02 14:44:59
问题 I'm trying to get a watermark image like here: How to add a watermark image on rmarkdown? I almost did it, but as I wrote on my original question the background.png image that the \includegraphics get comes from C:\Program Files (x86)\MiKTeX 2.9\tex\plain\present I'm currently using my Latex code from an external file using the follwing at beginning of my .Rmd: output: pdf_document: includes: in_header: header.tex And in header.tex I'm using the following code: \usepackage{eso-pic,graphicx

How to send R markdown report in body of email?

删除回忆录丶 提交于 2019-12-02 14:36:21
update: Brandon Bertelsen's answer : Brandon's answer produces the following output. It doesn't produce nice tables or highlight code like Rstudio does, and it crashes on some html files with unicode, so I'm not using it to automate my email reports. My current approach is to compile with Rstudio to html, open the html document in chrome, and then copy and paste the html document into gmail. This works pretty well, see this gist: https://gist.github.com/nelsonauner/a68b5a808c232ce7817e Original question: Is there an easy way to send an R markdown document as the body of an email, so that the

Rstudio Notebook (rmarkdown) running python: describe not shown

廉价感情. 提交于 2019-12-02 14:08:42
问题 I am runing some python chunks in a Rstudio notebook, which include reading a csv file and printing basic statistics. I could not find the way to print the statistics (describe()) as an output. Here is the code: ```{python, engine.path = '/home/user/anaconda3/bin/python3'} import pandas data_py = pandas.read_csv('/home/user/datafiles/data.csv', sep= ';') ``` ```{python, engine.path = '/home/user/anaconda3/bin/python3'} data_py.describe(include='all') ``` NO output printed. I also tried: ```

knitr doesn't know new function (r-markdown)

流过昼夜 提交于 2019-12-02 13:47:46
问题 I have a problem regarding the HTML-output with knitr (r-markdown). I worked with the function gamlss from the package "gamlss", but knitr cannot find this function/package. So when I try to make an output with "Knit HTML", it just appears an error message: "(error in eval(expr, envir, enclos) : couldnt find Function "gamlss" Calls: ... handle -> withCallingHandlers -> withVisible -> eval -> eval implementation stopped. " Has anybody ever dealt with a similar problem? 回答1: you have to load

Using bullets list in tikz's node label in rmarkdown

不想你离开。 提交于 2019-12-02 12:24:55
问题 I have a tikz code to generate some graphs that works properly in latex (tested on overleaf: https://www.overleaf.com). However, this is supposed to be part of a large rmarkdown file but I cannot seem to use bullets list in some of my node labels while in rmarkdown . My questions are: how can I use a list of bullets as tikz's node label in rmarkdown ? how can I customize that list to include some formatting like color, margin etc.? Where do things defined in latex using \newlist , \setlist go

R Shiny: includeMarkdown cannot render htmlwidgets

余生颓废 提交于 2019-12-02 12:18:58
This rmd file render ok to html, but the output is empty in shiny. Same problem with other htmlwidets like chartJSRadar file.rmd: --- title: "test" output: html_document --- ```{r} rpivotTable::rpivotTable(data.frame(a = c(1:10) ) , rows = 'a' ) ``` the htmlwidget is missing in this shiny app ui <- shinyUI( fluidPage( includeMarkdown('file.rmd') ) ) server <- function(input, output) { } shinyApp(ui, server) This question is related to this one Answering my own question. The code in includeMarkdown is not be executed by knitr. 来源: https://stackoverflow.com/questions/39171890/r-shiny

R-markdown self_contained

不问归期 提交于 2019-12-02 11:36:10
I'm using R-markdown for a couple of reports. I do it with self contained graphics because I send it via email. This worked till recently. But now the images are not shown anymore (with the error of a cross in a box). It might be that I updated the Version of RStudio. I used this a the top of the script: --- title: "blablablab" author: "blablablab" output: html_document: fig_caption: yes toc: no toc_depth: 2 toc_float: no number_sections: false self_contained: yes --- I know that this question is not very specific. I just wanted to ask if there is anybody which also had self contained graphics

Table spacing issue converting to PDF via LaTeX with pandoc

一曲冷凌霜 提交于 2019-12-02 10:44:58
问题 I'm facing the issue that in R texreg() doesn't seem to break the lines in the notes below the table. Also the margins between the models are not extended equally like it's happening with htmlreg() which gives a clean result. Manual breaks like \n or HTML tags are not working with 'texreg'. There's a partly workaround from MichaelChirico, but one has to change the texreg() function but it seems the method doesn't respect the case when we're dealing with more than one model side by side. Here

html of rmarkdown file (.Rmd) is not displayed correctly in browser

送分小仙女□ 提交于 2019-12-02 10:22:35
When I knit my .Rmd to html, it does not get displayed properly, i. e. it seems like something is wrong with the format (see screenshot below): The two hyperlinks do not work, the font is not sans-serif, there is no table of contents, etc. I used the same code on a different machine 6 months ago and it rendered as expected. However, today it does not. Does anybody have an idea why the html looks ugly? It seems not to depend on the browser I open the html with (tested it in IE and Chrome). This is the code i use: --- title: "my title" author: "subtitle" date: "my name, `r format(Sys.time(), '%d