r-markdown

How do I get (LaTeX math) typeset matrix with borders in HTML output from *.Rmd?

自闭症网瘾萝莉.ら 提交于 2020-01-25 23:41:57
问题 The following rmarkdown works fine when compiling to PDF (via LaTeX), but not when compiling to HTML (via Markdown). PDF (via LaTeX) --- title: "test" author: "Maximilian Held" output: pdf_document documentclass: memoir --- (@matrix-test2) $$ \bordermatrix{ ~ & Petra & Ingrid \cr Petra & 1 & 0 \cr Ingrid & 0 & 1 \cr } $$ HTML (via Markdown) --- title: "test" author: "Maximilian Held" output: html_document documentclass: memoir --- (@matrix-test2) $$ \bordermatrix{ ~ & Petra & Ingrid \cr Petra

Compiling the same bookdown project twice to the same output format (but with different names)

别来无恙 提交于 2020-01-25 10:19:10
问题 Is it possible to add the same format twice to the _output.yml in a Bookdown projects (with different parameters, of course), and somehow set a - different - name for them? So that clicking the Build Book would compile both parametrizations and name the files according to what we have set... 来源: https://stackoverflow.com/questions/59010344/compiling-the-same-bookdown-project-twice-to-the-same-output-format-but-with-di

Cannot use Markdown shortcodes in Blogdown's Rmd files

情到浓时终转凉″ 提交于 2020-01-25 01:11:12
问题 I am using Blogdown. In my post.Rmd file I need to use a shortcode: This is me calling a **shortcode**: `r blogdown::shortcode("mysc", .content = "Find **more** about this shortcode in [here](https://www.wikipedia.com).")` As you can see, .content is Markdown, not plain text. Shortcode mysc.html is: <p class="sc"> {{ if .Inner }} {{ .Inner }} {{ end }} </p> As you can see, I am using blogdown::shortcode because it is not possible to use shortcode syntax in Rmd files. Problem However the

Reactive subset in ddply for rmarkdown shiny

旧城冷巷雨未停 提交于 2020-01-25 00:34:27
问题 I am trying to calculate and plot % yield of some data based on user definable inputs. I am using rmarkdown and shiny to do this. I keep getting stuck when passing a reactive subset through ddply to count the number of rows in the subset.."invalid (null) left side of assignment". Here is an example data set: --- title: "Yield3" author: "P Downs" date: "Tuesday, May 26, 2015" output: html_document runtime: shiny --- # Create user input for reactive subsetting ```{r echo=FALSE} sliderInput(

Embedding a beamer presentation in a regular document with RMarkdown

孤人 提交于 2020-01-24 21:32:47
问题 My aim is write a document in markdown ( rmarkdown , more specifically), that can be compiled both to a regular PDF (or other) file and a beamer presentation at the same time, from the same source. (Using knitr .) Scenario: the document includes, in addition to the regular text, one sentence summaries for each paragraph and these should go to the presentation as the bullet points. I know that I can compile a document to several different output formats at the same time with knitr , but the

Bookdown: Exporting to a word document (Error in files2[[format]] : attempt to select less than one element in get1index)

让人想犯罪 __ 提交于 2020-01-24 16:58:05
问题 I am writing my thesis using the bookdown package and the memoir latex class. Everything works relatively fine when I am exporting to pdf or to html but I am unable to export the thesis to a word document... I get the following mysterious error: Error in files2[[format]] : attempt to select less than one element in get1index It is difficult to provide a reproducible example though, as I am working from my messy dissertation repository. But here is (a part of) my _output.yml file: bookdown:

displaying all the rows and columns of tibble in R-markdown

丶灬走出姿态 提交于 2020-01-24 07:27:28
问题 I'm working on an R markdown file. The results of analysis are shown in the form of tibble but in order to see all the columns and rows, I need to click to expand. However, since I'm going to knit the file into html, I need to display all the columns and rows in the R markdown file. I did a search and came up with the following codes: options(tibble.width = Inf) # displays all columns. options(tibble.print_max = Inf) # to show all the rows. However, I don't know where to put them. I placed

displaying all the rows and columns of tibble in R-markdown

只谈情不闲聊 提交于 2020-01-24 07:27:05
问题 I'm working on an R markdown file. The results of analysis are shown in the form of tibble but in order to see all the columns and rows, I need to click to expand. However, since I'm going to knit the file into html, I need to display all the columns and rows in the R markdown file. I did a search and came up with the following codes: options(tibble.width = Inf) # displays all columns. options(tibble.print_max = Inf) # to show all the rows. However, I don't know where to put them. I placed

R markdown ioslides incremental mode for code chunks

泄露秘密 提交于 2020-01-24 03:03:32
问题 How do you turn R code chunks to appear incrementally? For example, I put the following option in the header: --- ...other configurations... output: ioslides_presentation: incremental: true --- But the incremental mode only applies to bullets and not to the code chunks ## Slide 1 * this bullet point appears first * this bullet point appears second ```{r eval=FALSE} # This chunk is there from the beginning ``` So my question is : How do you make the chunk appear after the second bullet? 回答1:

custom R Markdown plot size within loop

你离开我真会死。 提交于 2020-01-24 01:09:08
问题 I'm creating strip plots within a R Markdown/knittr document. I would the like vertical size of the plots to be proportional to the number of rows in the strip plot. EDIT: The best solution would also allow interleaving of tables and plots. See Interleaving tables and plots in R Markdown, within loop In this example, the plot for MPG for cars with "3 Carburetors" is the same height as the plot for cars with "2 Carburetors", even though there are three different gear configurations for 2