r-markdown

Add inline image in Rmarkdown

烂漫一生 提交于 2020-12-30 08:08:26
问题 I can't find a way to insert an inline image on a markdown document I'm producing with RStudio. Seems like the RmarkDown Style Cheat sheet (https://www.rstudio.com/wp-content/uploads/2016/03/rmarkdown-cheatsheet-2.0.pdf) does not mention such feature. Is this currently possible? Here's an example using html for a svg image: link: http://www.herongyang.com/HTML/HTML5-Add-Inline-SVG-Image-HTML5-Documents.html 回答1: Markdown syntax allows inline images: foo ![](image.png) bar 回答2: Could also use

Add inline image in Rmarkdown

孤街醉人 提交于 2020-12-30 08:06:57
问题 I can't find a way to insert an inline image on a markdown document I'm producing with RStudio. Seems like the RmarkDown Style Cheat sheet (https://www.rstudio.com/wp-content/uploads/2016/03/rmarkdown-cheatsheet-2.0.pdf) does not mention such feature. Is this currently possible? Here's an example using html for a svg image: link: http://www.herongyang.com/HTML/HTML5-Add-Inline-SVG-Image-HTML5-Documents.html 回答1: Markdown syntax allows inline images: foo ![](image.png) bar 回答2: Could also use

Programmatically create tab and plot in markdown

非 Y 不嫁゛ 提交于 2020-12-23 11:10:13
问题 I'm trying to create a dynamic number of tabs in my rmd with some content inside. This one doesn't help. Something like this: --- title: "1" output: html_document --- ```{r } library(highcharter) library(tidyverse) iris %>% dplyr::group_split(Species) %>% purrr::map(.,~{ # create tabset for each group ..1 %>% hchart("scatter", hcaes(x = Sepal.Length, y = Sepal.Width)) }) ``` 回答1: You can set results = 'asis' knitr option to generate the tabs in the map function using cat . Getting Highcharter

Programmatically create tab and plot in markdown

微笑、不失礼 提交于 2020-12-23 11:07:49
问题 I'm trying to create a dynamic number of tabs in my rmd with some content inside. This one doesn't help. Something like this: --- title: "1" output: html_document --- ```{r } library(highcharter) library(tidyverse) iris %>% dplyr::group_split(Species) %>% purrr::map(.,~{ # create tabset for each group ..1 %>% hchart("scatter", hcaes(x = Sepal.Length, y = Sepal.Width)) }) ``` 回答1: You can set results = 'asis' knitr option to generate the tabs in the map function using cat . Getting Highcharter

Programmatically create tab and plot in markdown

别来无恙 提交于 2020-12-23 11:05:13
问题 I'm trying to create a dynamic number of tabs in my rmd with some content inside. This one doesn't help. Something like this: --- title: "1" output: html_document --- ```{r } library(highcharter) library(tidyverse) iris %>% dplyr::group_split(Species) %>% purrr::map(.,~{ # create tabset for each group ..1 %>% hchart("scatter", hcaes(x = Sepal.Length, y = Sepal.Width)) }) ``` 回答1: You can set results = 'asis' knitr option to generate the tabs in the map function using cat . Getting Highcharter

add_attachment in blastula R package

无人久伴 提交于 2020-12-15 06:51:55
问题 How can I sent an attachment in blastula. correo <- compose_email( body = md("Tarea_01")) correo %>% add_attachment(file = "emilia/tarea_01/liquenes.csv", filename = "liquenes") correo %>% smtp_send( from = "xxxxxx@gmail.com", to = "xxxxxxx@gmail.com", subject = "Tarea_01", credentials = creds_key(id = "gmail") ) I can send the email but there is no attachment in received email. Any clue why there is no attachment? Manuel 回答1: The add_attachments() function didn't work for me. I "de

add_attachment in blastula R package

喜你入骨 提交于 2020-12-15 06:51:09
问题 How can I sent an attachment in blastula. correo <- compose_email( body = md("Tarea_01")) correo %>% add_attachment(file = "emilia/tarea_01/liquenes.csv", filename = "liquenes") correo %>% smtp_send( from = "xxxxxx@gmail.com", to = "xxxxxxx@gmail.com", subject = "Tarea_01", credentials = creds_key(id = "gmail") ) I can send the email but there is no attachment in received email. Any clue why there is no attachment? Manuel 回答1: The add_attachments() function didn't work for me. I "de

RMarkdown - having the title (text heading before a table) be conditional

纵然是瞬间 提交于 2020-12-15 05:20:48
问题 I have an R Markdown that is parameterized. Basically, I'm filtering a dataframe by a "case_id" field and outputting a table of those filtered results. I render the RMarkdown document in a loop that cycles through each unique case_id. For each case_id in an array, I check the dataframe, and if it exists, I output a filtered table showing results for that case_id. Working example here: RMarkdown: --- title: "My Title" output: html_document: params: case: case --- ```{r setup, include=FALSE}

Download Pdf report in Shiny

心已入冬 提交于 2020-12-13 03:42:27
问题 Im making a shiny app, that will create 2 plots and one table. There are a lot of options in the select input part. Once selected it will subset the data.frame and return with another data.frame to be analised. It will plot accordingly and I want it to generate a report in pdf (or html) with the details of the input. Like "Generate Report" button and give me the plot for that specific input and with the input$company.pdf (or html) name. I have searched everywhere and I cant find out how to do

Download Pdf report in Shiny

放肆的年华 提交于 2020-12-13 03:41:50
问题 Im making a shiny app, that will create 2 plots and one table. There are a lot of options in the select input part. Once selected it will subset the data.frame and return with another data.frame to be analised. It will plot accordingly and I want it to generate a report in pdf (or html) with the details of the input. Like "Generate Report" button and give me the plot for that specific input and with the input$company.pdf (or html) name. I have searched everywhere and I cant find out how to do