r-markdown

rmarkdown::render_site() Error in rmarkdown::render_site() : No site generator found

旧城冷巷雨未停 提交于 2019-12-10 02:52:38
问题 I am trying to knit together 3 files using this example: http://rmarkdown.rstudio.com/rmarkdown_websites.html My files all share the same directory, which has been set in the RStudio build options. I literally copied the YML from the examples with my own file names. Even if I copy the examples directly, I get the same error. I even ran the site_generator function from the RMarkdown Github: https://github.com/rstudio/rmarkdown/blob/master/R/render_site.R#L157 I noticed there are options for

Specifying multiple simultaneous output formats in knitr (new)

試著忘記壹切 提交于 2019-12-10 01:02:55
问题 Can I write a YAML header to produce multiple output formats for an R Markdown file using knitr? I could not reproduce the functionality described in the answer for the original question with this title. This markdown file: --- title: "Multiple output formats" output: pdf_document: default html_document: keep_md: yes --- # This document should be rendered as an html file and as a pdf file produces a pdf file but no HTML file. And this file: --- title: "Multiple output formats" output: html

How can I fix column breaks in an Rmarkdown / ioslides presentation

♀尐吖头ヾ 提交于 2019-12-10 00:44:47
问题 Using what is currently the development version of RStudio (0.98.758), I'm loving that I can author an ioslides presentation in rmarkdown . The rmarkdown docs for this format give a description of how to do a two-column slide, and it comes with the warning that: Note that content will flow across the columns so if you want to have an image on one side and text on the other you should make sure that the image has sufficient height to force the text to the other side of the slide. But I can't

change code block color in knitr/markdown

非 Y 不嫁゛ 提交于 2019-12-09 15:54:05
问题 I'm working on a markdown document in Rstudio that compares Perl and R. What I'd like to be able to do is have different code block background colors depending on the language used. For example R code block ```{r} dog <- 1 cat <- 2 dog + cat ``` Perl code block ```{r, engine='perl'} $dog = 1; $cat = 2; print $dog + $cat; ``` If you generate an html file using knitr with the above code, the r code block has a solid grey background while the output from the code block has a white/transparent

Referencing a 'hand-made' table using bookdown package

浪尽此生 提交于 2019-12-09 14:36:33
问题 I'm trying to reference a table using the bookdown package. In the documentation for tables, the author only shows how to create tables using knitr::kable . ```{r table1} knitr::kable( head(iris, 20), caption = 'Here is a nice table!', booktabs = TRUE ) ``` Table \@ref(tab:table1) is here. Using knitr::kable works just fine. The caption of the table is displayed and I can reference the table. I would like to do the same with a classic, hand-made markdown table, but obviously the code below

Create Shiny Presentation from Shiny App?

落爺英雄遲暮 提交于 2019-12-09 13:32:56
问题 I found this - http://shiny.rstudio.com/gallery/download-knitr-reports.html - awesome example that can create static PDFs, HTMLs, and Word Docs. What I want to be able to do is upload a data set that can then generate a templatized Shiny Presentation. I've tried multiple routes with little success. The furthest I've gotten is including this code in my markdown file: --- title: "shinyPresentation" author: "maloneypatr" date: "Wednesday, September 03, 2014" output: ioslides_presentation: self

Download multiple plotly plots to PDF Shiny

南楼画角 提交于 2019-12-09 11:42:54
问题 My Shiny App displays a plotly plot for whatever input the user selects. I want a download button that saves ALL the plots inside a PDF file on the user's system. I'm using R markdown for knitting a PDF report and then donwloading it using downloadHandler in Shiny. As of now, I can create each plot individually in my Shiny code and then pass them as a list of parameters to my r markdown file. Since I have a large number of plots (>25) in my actual project, I want to do it in a loop. Here's a

Conditional formatting of a table in RShiny

送分小仙女□ 提交于 2019-12-09 11:39:40
问题 I'm trying to visualize a cohort analysis, and wanted to use RenderDataTable in shiny to get this sort of a visualization where I would be able to highlight all the cells based on a separate column having values 1/0, with 1 being shaded and 0 not being shaded. I Tried a couple of things, including trying to use geom_tile in ggplot2 , but it was of no avail. I also tried looking at rpivotTable , but I wasn't able to figure out how to shade certain cells. Example Data: df <- " cohort wk value

Make Scrollbar appear in RMarkdown code chunks (html view)

蓝咒 提交于 2019-12-09 11:20:28
问题 I am making an RMarkdown document using RStudio and knitr. I want my code chunks to print without wrapping text on the html file I create. Is there an option I am missing that stops text wrapping of code? So far I have only found questions about how to remove scrollbars, making me think that maybe something has changed recently. (RStudio Version 0.99.892, R Version 3.2.2) Thanks! Simple example RMarkdown document. (The setup section is the default): --- title: "Stop looking bad RMarkdown!"

R markdown PDF: Temporarily hide spoiler code for quiz takers

℡╲_俬逩灬. 提交于 2019-12-09 10:08:54
问题 I am using R markdown to create a PDF R course. I want to insert a quiz like the following: --- output: pdf_document --- What is the class of the following R object? 1. `pi` ```{r} class(pi) ``` Which, as expected, creates a PDF with this content: However, I would like the reader to not have such an easy access to the answer. These are the ideas I've had so far to achieve this: Paint the answer and code white, so the reader would have to select the text to see the answer; Include a tooltip