r-markdown

Width of R code chunk output in RMarkdown files knitr-ed to html

杀马特。学长 韩版系。学妹 提交于 2020-08-21 09:48:16
问题 Question: What is the current working solution to set the width of r code output in html files? I would like to set width to something big and use a slider in the html output. options(width = XXX) seems not to work anymore. Example: --- title: "Width test" output: html_document: theme: default --- ```{r global_options, echo = FALSE, include = FALSE} options(width = 999) knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE, cache = FALSE, tidy = FALSE, size = "small") ``` ```{r

Can't escape LaTeX dollar sign `$` in blogdown

喜你入骨 提交于 2020-08-20 08:05:12
问题 1. An amount between $5 and $10. 2. An amount between \$5 and \$10. 3. An amount between \\$5 and \\$10. Please include the code chunk above in a blogdown .Rmd file, and make sure your Hugo theme supports LaTeX equations. Then Save and serve your site with blogdown::serve_site() . When I do this none of the three options shown above properly escape LaTeX's dollar sign $ . Here's what happens to me (and yes I did update all packages with update.packages(ask = FALSE, checkBuilt = TRUE) prior to

Code works interactively but not while knitting

痞子三分冷 提交于 2020-08-17 05:43:17
问题 I have an RMarkdown document with some R code in it. The code works fine when I'm running it interactively in the console. However, when I try to knit the document (using the "knit" button in RStudio), R throws error messages that some objects cannot be found. 回答1: When you compile a document (using the "knit" button in RStudio), knitting takes place in a separate R session. Therefore, your document must be self-contained : Objects from the Global Environment of your interactive sessions are

Code works interactively but not while knitting

我与影子孤独终老i 提交于 2020-08-17 05:41:09
问题 I have an RMarkdown document with some R code in it. The code works fine when I'm running it interactively in the console. However, when I try to knit the document (using the "knit" button in RStudio), R throws error messages that some objects cannot be found. 回答1: When you compile a document (using the "knit" button in RStudio), knitting takes place in a separate R session. Therefore, your document must be self-contained : Objects from the Global Environment of your interactive sessions are

Create a carousel in Rmarkdown?

谁说我不能喝 提交于 2020-08-09 10:23:26
问题 Is there any quick and easy way to create a simple carousel in an Rmarkdown doc? What I know so far I found slickr but run into errors setting options and knitting (the errors could be specific to me / mac - I am not sure at this point). I believe it would be possible to hard code html/javascript into the RMarkdown doc i.e. the same way a carousel would be done in any other (regular) html document (i.e. using the html code here)- but I wonder if there's a native (R) way? Example use In my

Create a carousel in Rmarkdown?

佐手、 提交于 2020-08-09 10:22:19
问题 Is there any quick and easy way to create a simple carousel in an Rmarkdown doc? What I know so far I found slickr but run into errors setting options and knitting (the errors could be specific to me / mac - I am not sure at this point). I believe it would be possible to hard code html/javascript into the RMarkdown doc i.e. the same way a carousel would be done in any other (regular) html document (i.e. using the html code here)- but I wonder if there's a native (R) way? Example use In my

How to put a link to another vignette in the same R package in a vignette

落爺英雄遲暮 提交于 2020-08-09 05:40:30
问题 I have a package on Bioconductor and I'm in the process of adding a second vignette to it. I want to link the second vignette to the first vignette, as one vignette is on the general workflow of the package and the second is on fine parameter tuning, for more advanced users. Is there a clean way to do it ? The only related topic that I found is this one : best way to link to a vignette from manual in an R package But it did not really helped me, Thanks for your help, Alexis 回答1: If you're

Use citation() in R Markdown to automatically generate a bibliography of R packages

我是研究僧i 提交于 2020-08-07 04:55:52
问题 I would like to cite the R packages used in a project but since they are quite numerous, I think it would be a good idea to create two separate reference sections: one with the references of my specific domain and one with the references for the R packages. My first idea would be to check if I can export all the citations of the packages used at once in a .bib file, but I'm not sure that R Markdown can handle both the .bib file with the bibliography of papers specific to my domain and the

Use citation() in R Markdown to automatically generate a bibliography of R packages

心已入冬 提交于 2020-08-07 04:55:06
问题 I would like to cite the R packages used in a project but since they are quite numerous, I think it would be a good idea to create two separate reference sections: one with the references of my specific domain and one with the references for the R packages. My first idea would be to check if I can export all the citations of the packages used at once in a .bib file, but I'm not sure that R Markdown can handle both the .bib file with the bibliography of papers specific to my domain and the

Rmarkdown & PDF Output: Evaluate Markdown inside Latex section

孤人 提交于 2020-08-05 07:55:47
问题 How can I make it possible that markdown code used inside Latex Code gets evaluated? (Rmarkdown with PDF (Latex) Output) Very simple minimal example: \begin{center} **should be bold text** \end{center} Current output in .tex file after compiling with knitr: \begin{center} **should be bold text** \end{center} Expected: \begin{center} \textbf{should be bold text} \end{center} I would be happy to find a way to get this working, because I try to find a way in which I can pass a tibble/dataframe