r-markdown

Error: Input files not all in same directory, please supply explicit wd

泪湿孤枕 提交于 2020-07-03 13:27:15
问题 After trying to build a PDF that worked ~2 weeks ago, no fuss, on a new machine with a fresh install of R, R studio, bookdown , etc, I have this error: Error: Input files not all in same directory, please supply explicit wd I have chapters of .Rmd files sorted into directories, and so if I change rmd_subdir from true to false , the error goes away, but... I just can't work with 100+ chapters containing 4-7 each scenes in the root of the project; I'll go insane. I have new_session: no in my

Error: Input files not all in same directory, please supply explicit wd

狂风中的少年 提交于 2020-07-03 13:27:07
问题 After trying to build a PDF that worked ~2 weeks ago, no fuss, on a new machine with a fresh install of R, R studio, bookdown , etc, I have this error: Error: Input files not all in same directory, please supply explicit wd I have chapters of .Rmd files sorted into directories, and so if I change rmd_subdir from true to false , the error goes away, but... I just can't work with 100+ chapters containing 4-7 each scenes in the root of the project; I'll go insane. I have new_session: no in my

kableExtra::pack_rows() - grouping not working for last row in long table and no indentation for wrapped text

断了今生、忘了曾经 提交于 2020-07-03 05:25:11
问题 I use the kableExtra package to generate a long table in an R markdown documents knitted to PDF. Sets of rows of the table are grouped together using kableExtra::pack_rows() (formerly kableExtra::group_rows() ) Two issues arise: If the last row forms a set, its grouping is not displayed if one sets longtable = TRUE to allow the long table to span across multiple pages and at the same time uses kable_styling(..., latex_options = c("repeat_header")) to repeat the header of the table on each

Using `ggplotly` and `DT` from a `for` loop in Rmarkdown

人盡茶涼 提交于 2020-06-27 04:03:11
问题 Is that possible to use ggplotly() or datatable() in RMarkdown from inside a for loop or function? Example: --- title: "Using `ggplotly` and `DT` from a `for` loop in Rmarkdown" output: html_document --- ```{r setup, include=FALSE} library(ggplot2); library(DT) ``` ## Without `for` loop - works ```{r} datatable(cars) g <- ggplot(cars) + geom_histogram(aes_string(x=names(cars)[1] )) ggplotly(g) ``` ## From inside the `for` loop - does not work (nothing is printed) ```{r} for( col in 1:ncol

How to escape “$” in R markdown and slidify it?

青春壹個敷衍的年華 提交于 2020-06-25 22:15:07
问题 When write some notes in R Markdown, I need to escape the dollar sign, making sentence within two dollar sign not a formula. I have tried \$ blah blah blah \$ and \\$ blah blah blah \\$ or even <p>$ blah blah blah </p>$ . What works is `$`. But I don't want to highlight it. ps: I want to slidify it, so both \$ and \\$ don't work. 回答1: You just need to use backslashes \ to escape, not forward slashes: Line with $\text{Math:} \frac{3}{4}$. Line with \$ escaped dollar signs \$. 来源: https:/

How to escape “$” in R markdown and slidify it?

非 Y 不嫁゛ 提交于 2020-06-25 22:15:00
问题 When write some notes in R Markdown, I need to escape the dollar sign, making sentence within two dollar sign not a formula. I have tried \$ blah blah blah \$ and \\$ blah blah blah \\$ or even <p>$ blah blah blah </p>$ . What works is `$`. But I don't want to highlight it. ps: I want to slidify it, so both \$ and \\$ don't work. 回答1: You just need to use backslashes \ to escape, not forward slashes: Line with $\text{Math:} \frac{3}{4}$. Line with \$ escaped dollar signs \$. 来源: https:/

How to escape “$” in R markdown and slidify it?

匆匆过客 提交于 2020-06-25 22:14:51
问题 When write some notes in R Markdown, I need to escape the dollar sign, making sentence within two dollar sign not a formula. I have tried \$ blah blah blah \$ and \\$ blah blah blah \\$ or even <p>$ blah blah blah </p>$ . What works is `$`. But I don't want to highlight it. ps: I want to slidify it, so both \$ and \\$ don't work. 回答1: You just need to use backslashes \ to escape, not forward slashes: Line with $\text{Math:} \frac{3}{4}$. Line with \$ escaped dollar signs \$. 来源: https:/

How to create interlinear gloss in R markdown?

瘦欲@ 提交于 2020-06-25 05:40:06
问题 I would like to create an interlinear gloss in R markdown, in which glosses are aligned with the words that they are providing information about. In the following example, I want the left edge of each character string in the German sentence on top to be aligned with the left edge of each character string of the English beneath it: Ich habe den Bub gesehen 1sg.NOM have.1sg.PRES DEF.ACC.SG boy.ACC.SG see.PERF.PART So the left edge of "boy.ACC.SG" should be aligned right beneath the left edge of

Display LaTeX equations in a shiny dashboard app in R

岁酱吖の 提交于 2020-06-25 03:25:37
问题 I would like to display an Rmd file with LaTeX equations in my shiny dashboard app. I've run into problems using includeMarkdown() and includeHTML() . Here is a simplified app of what I'm trying to achieve. Here is my app.R: library(shinydashboard) ui <- dashboardPage( dashboardHeader(title='My test application'), dashboardSidebar( sidebarMenu( menuItem("Theory", tabName = "theory", icon = icon("book")) ) ), dashboardBody( tabItems( tabItem(tabName="theory", includeMarkdown("Theory.Rmd")

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

眉间皱痕 提交于 2020-06-24 07:02:50
问题 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