r-markdown

Knit word document from Shiny App with template.docx

落爺英雄遲暮 提交于 2020-08-26 10:01:15
问题 I'm trying to knit a word document from a shiny app using a template.docx file. I get the following error message: pandoc.exe: template.docx: openBinaryFile: does not exist (No such file or directory) The following 3 files were all currently located in the same directory. app.R: library(shiny) library(rmarkdown) ui <- fluidPage( titlePanel("Word template"), sidebarLayout( sidebarPanel(), mainPanel( downloadButton("download", "Download Report") ) ) ) server <- function(input, output) { output

Knit word document from Shiny App with template.docx

时间秒杀一切 提交于 2020-08-26 10:00:25
问题 I'm trying to knit a word document from a shiny app using a template.docx file. I get the following error message: pandoc.exe: template.docx: openBinaryFile: does not exist (No such file or directory) The following 3 files were all currently located in the same directory. app.R: library(shiny) library(rmarkdown) ui <- fluidPage( titlePanel("Word template"), sidebarLayout( sidebarPanel(), mainPanel( downloadButton("download", "Download Report") ) ) ) server <- function(input, output) { output

How can I embed a plot within a RMarkdown table?

|▌冷眼眸甩不掉的悲伤 提交于 2020-08-24 07:10:51
问题 I am trying to generate a report template in RMarkdown. In this report, I would like a plot in the cell next to the number and text of a question on the survey that I am using. I generated some example plots and made the following example in MS Word. Is it possible to put an R-generated plot in a table in RMarkdown? What would the code look like if it is? Edit (9/8/16): I am including the .Rmd file as it stands now. The issue is that the html file fails to compile with the following message.

Can we keep the caption at the top of plotly objects in html output from rmarkdown?

时光总嘲笑我的痴心妄想 提交于 2020-08-24 06:58:39
问题 The following markdown shows the problem that captions that successfully go to the top of ggplot figures with the use of fig.topcaption=TRUE , but do not with plotly objects. I learnt about fig.topcaption here. The underlying code for the fig.topcaption appears to live here in knitr, though either that is not compatible with plotly figures, or it could be pandoc, or html/html widgets-related, or somewhere else in the chain from the rmarkdown to final output. I'm happy enough with a work

Embed iframe Amazon Associate Link into .md file R

妖精的绣舞 提交于 2020-08-24 04:07:52
问题 I'm trying to embed an Amazon Associate link into a post created using R blogdown and Hugo. It is a simple .md file. The Amazon Associate site is here. The code I am trying to post with my store-id is this: <iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ac&ref=qf_sp_asin_til&ad_type=product_link&tracking_id=hatro-20

Embed iframe Amazon Associate Link into .md file R

你。 提交于 2020-08-24 04:06:29
问题 I'm trying to embed an Amazon Associate link into a post created using R blogdown and Hugo. It is a simple .md file. The Amazon Associate site is here. The code I am trying to post with my store-id is this: <iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ac&ref=qf_sp_asin_til&ad_type=product_link&tracking_id=hatro-20