r-markdown

LaTeX PDF with images from web in shinyapp

爱⌒轻易说出口 提交于 2020-01-14 08:22:28
问题 I used to be able to include images from URLs in PDF reports generated from shiny apps doing ![](url.com) . A few markdown versions later I get the following error: ! Unable to load picture or PDF file https://i0.wp.com/wptavern.com/wp-content/uploads/2016/07/stack-overflow.png?ssl=1 for the same code. Adding pandoc_args: ["--extract-media", "."] to the YAML downloads the imaged file locally but only works in local r-markdown files. How does shinyapp store local files and how to get the

how to comment out R code blocks in R markdown?

安稳与你 提交于 2020-01-14 08:04:33
问题 I'm editing an R markdown file (.Rmd) that has a lot of R code blocks to move groups of those code blocks into "child" documents to simplify rearranging sections (if nothing else). As I convert sections to child documents, I would like to test the new child document without running the rest of the blocks and other children. However, when I use to comment out those sections, the R blocks still run (but RStudio makes the sections "look" as though they were commented out). If I eliminate the

how to comment out R code blocks in R markdown?

僤鯓⒐⒋嵵緔 提交于 2020-01-14 08:04:09
问题 I'm editing an R markdown file (.Rmd) that has a lot of R code blocks to move groups of those code blocks into "child" documents to simplify rearranging sections (if nothing else). As I convert sections to child documents, I would like to test the new child document without running the rest of the blocks and other children. However, when I use to comment out those sections, the R blocks still run (but RStudio makes the sections "look" as though they were commented out). If I eliminate the

Why figure numbers with two digits separated by dot are shown only in html_document2?

不想你离开。 提交于 2020-01-14 05:53:09
问题 Here is simple RMarkdown document with two sections and two images. --- output: bookdown::html_document2: default bookdown::word_document2: default bookdown::pdf_document2: default --- \newpage # Part 1 Part 1 starts here. See Figure \@ref(fig:fig1-1) ![(\#fig:fig1-1) expected to be Figure 1.1.](/usr/lib/rstudio/www/images/rstudio.png) # Part 2 Part 2 starts here. See Figure \@ref(fig:fig2-1) ![(\#fig:fig2-1) expected to be Figure 2.1.](/usr/lib/rstudio/www/images/rstudio.png) I expect that

NOTE or WARNING from package check when README.md includes images

丶灬走出姿态 提交于 2020-01-14 03:49:18
问题 I have a package with a README.Rmd that I pass to rmarkdown::render() producing README.md and a directory README_files , which contains images in README.md . This looks like the tree below. README_files is not a standard package directory, so if it isn't in .Rbuildignore , checking the package with R CMD check shows a note: * checking top-level files ... NOTE Non-standard file/directory found at top level: README_files But including the directory in .Rbuildignore leads to a warning, if and

Cross-referencing in rticles

隐身守侯 提交于 2020-01-13 20:37:21
问题 The bookdown offers great cross-referencing options for equations, figures, tables and sections: https://bookdown.org/yihui/bookdown/cross-references.html However, they seems to not work when I set as an output 'rticles::elsevier_article'. What are the available options for cross-referencing in rticles? 回答1: I haven't tried, but there is a possible solution here: https://bookdown.org/yihui/bookdown/a-single-document.html Particularly, specify in your YAML metadata: output: bookdown::pdf_book:

Coverpage and copyright notice before title in R bookdown?

本秂侑毒 提交于 2020-01-13 12:48:09
问题 Back in March, I asked a question and got an answer to including coverpage in a pdf document rendered by R bookdown: R bookdown - cover page and appendix I tried the solution and came up with the following results: using in index.rmd yaml: output: pdf_document: includes: before_body: frontpage.tex number_sections: yes toc: yes toc_depth: 3 site: bookdown::bookdown_site documentclass: book classoption: letterpaper The title still appeared before the coverpage AND the Chapter 'wording' in

Coverpage and copyright notice before title in R bookdown?

点点圈 提交于 2020-01-13 12:45:54
问题 Back in March, I asked a question and got an answer to including coverpage in a pdf document rendered by R bookdown: R bookdown - cover page and appendix I tried the solution and came up with the following results: using in index.rmd yaml: output: pdf_document: includes: before_body: frontpage.tex number_sections: yes toc: yes toc_depth: 3 site: bookdown::bookdown_site documentclass: book classoption: letterpaper The title still appeared before the coverpage AND the Chapter 'wording' in

Coverpage and copyright notice before title in R bookdown?

给你一囗甜甜゛ 提交于 2020-01-13 12:44:49
问题 Back in March, I asked a question and got an answer to including coverpage in a pdf document rendered by R bookdown: R bookdown - cover page and appendix I tried the solution and came up with the following results: using in index.rmd yaml: output: pdf_document: includes: before_body: frontpage.tex number_sections: yes toc: yes toc_depth: 3 site: bookdown::bookdown_site documentclass: book classoption: letterpaper The title still appeared before the coverpage AND the Chapter 'wording' in

force column break in RMarkdown ioslides {.columns-2} layout

依然范特西╮ 提交于 2020-01-13 10:44:29
问题 When preparing a presentation with RMarkdown's ioslides, I encountered a problem which I have not been able to find a solution for. This answer did also not solve this specific problem. Sometimes, two-column layouts are best to explain something with an image on one side and text on the other. However, As in the following example, the column breaks do not appear to work as desired. Is there any way to force columnbreaks at a specific point? I have thought about increasing the image height on