r-markdown

Sending R Markdown output as body email via outlook (RDCOMclient)

走远了吗. 提交于 2020-06-24 07:00:49
问题 Just learning R Markdown language and wondering if I can send the output in body email via outlook from R (using RDCOMClient; my office don't use gmail) Thank you 回答1: Building upon Ben's answer, the strange symbols showing up everywhere are probably being caused by a enconding mismatch between R and Outlook Object (created by the RDCOMClient Library). Outlook's basic encoding is "UTF-16", while the basic RMarkdown input is in "UTF-8". To make sure your html output generated by RMarkdown is

Sending R Markdown output as body email via outlook (RDCOMclient)

半腔热情 提交于 2020-06-24 07:00:12
问题 Just learning R Markdown language and wondering if I can send the output in body email via outlook from R (using RDCOMClient; my office don't use gmail) Thank you 回答1: Building upon Ben's answer, the strange symbols showing up everywhere are probably being caused by a enconding mismatch between R and Outlook Object (created by the RDCOMClient Library). Outlook's basic encoding is "UTF-16", while the basic RMarkdown input is in "UTF-8". To make sure your html output generated by RMarkdown is

How to change colors and attributes of Table of Contents in R Markdown HTML document?

拈花ヽ惹草 提交于 2020-06-24 06:58:09
问题 I've spent an inordinate amount of time Google'ing this and can't seem to figure it out. I am making HTML documents using R Markdown (docs here: http://rmarkdown.rstudio.com/html_document_format.html). I want to change the color, and other attributes, of the floating table of contents. Preferably, I would like to do this via embedded CSS in the Rmd file itself. For example, I can already change the color of the text that appears in the TOC if I put this in my Rmd file: --- title: "Untitled"

Line breaks in R Markdown text (not code blocks)

我是研究僧i 提交于 2020-06-24 06:13:30
问题 Using the tufte_template rmarkdown file, I am trying to make a new paragraph (like \newthought{} , but no caps.) I use two spaces, denoted here by *: # Introduction The Tufte-\LaTeX\ [^tufte_latex] document** ** classes define a style similar to the style Edward Tufte uses in his books... but get this result: I have tried \n in place of the second pair of spaces (**) as well, but pandoc throws an error. pandoc.exe: Error producing PDF from TeX source Error: pandoc document conversion failed

Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font width unknown for character 0x20

风格不统一 提交于 2020-06-21 05:38:07
问题 I would like to use the free font Lato in ggplot2 graphs since the remainder of my R markdown document is set in this font. The font is installed on my system and available in the Font Book ( once only ). All available fonts are loaded with the extrafont package and registered in the extrafontdb . When I knit my markdown document as PDF, all text is correctly typeset in Lato . However, the plot labels of my ggPlots are not shown. I also receive the following warning message: Warning in grid

R Markdown pdf_document2 PDF figure and table numbers by section

|▌冷眼眸甩不掉的悲伤 提交于 2020-06-17 14:09:55
问题 I want to generate a pdf_document2 PDF document in R Markdown where the tables and figures are labeled according to their section number. For instance, the first figure in Section 2 would be Figure 2.1. I can do that with html_document2 but not with pdf_document2 . See below for the code that I have written. Right now the code generates continuous Figure numbers (Figures 1, 2, 3, 4) instead of Figures 1.1, 1.2, 2.1, 2.2. title: "Testing Section Numbers" author: "Authors" date: "January 2019"

Tabset in html rmarkdown

偶尔善良 提交于 2020-06-17 13:21:47
问题 I am working on a html document (readthedown theme) of rmarkdown and i would like to create several ".tabset" but : I would like that the tabset's content appears only when i click on it in the table of content and not appears ones after ones directly on the body of doc. For example, when i am in the first tabset, and i'm going through the several sub tabset, i don't want to seing the next tabset on content of the page. in my situation i have : # Title1 {.tabset .tabset-fade} ## sub title a {

Internal links and URLs not working after embedding fonts in PDF kitted with R markdown

血红的双手。 提交于 2020-06-17 09:14:11
问题 I use extrafont::embed_fonts to embed fonts in a simple R markdown document which works fine. However, after embedding the fonts contained in the document, any references (internal links, URLs, citations) do not work anymore. Below an MWE with sample output (with & without embedding) is provided. Many thanks for help! MWE: --- title: "Embedding Fonts in PDF" output: pdf_document --- ```{r echo=FALSE, message=FALSE, warning=FALSE, out.width = '30%'} library(ggplot2) library(extrafont) # font

How to include an external code file in rmakdown to output in pdf with sintax highlight

南笙酒味 提交于 2020-06-17 03:42:28
问题 My question is inspired from this one. However, the difference is that my output is PDF. I have a C++ code saved in an external file. I want to print it into a r markdown PDF with syntax highlight. My example.cpp code, which is in fact a TMB code: // Fitting Bivariate Gaussian distribution. #include <TMB.hpp> template<class Type> Type objective_function<Type>::operator() () { using namespace density; DATA_MATRIX(Y); PARAMETER_VECTOR(rho); PARAMETER_VECTOR(sigma); vector<Type> rho_temp(1); rho

HTML code inside of a R-markdown block for a single line

吃可爱长大的小学妹 提交于 2020-06-16 13:03:40
问题 I have an R-markdown document in a for loop (testing various kinds of models), and I would like to set them off with HTML Headers, as it is otherwise hard to find the models I am looking for. There is the "asis" option, but that turns off formatting for the entire block, which is not what I want. I have tried a few things I found here, but nothing really works. Here is my code: --- title: "Untitled" author: "Mike Wise - 25 Jul 2014" date: "November 2, 2015" output: html_document --- Test ```