There appears to be a real dearth of information/resources on the internet for creating shiny apps using flexdashboard in rmarkdown files. I needed to run a simulation, so I copied the instructions here: https://rviews.rstudio.com/2018/07/18/monte-carlo-shiny-part-3/. Everything went well, but I'm finding it impossible to modify the aesthetics of a shiny app via and rmarkdown file. I've tried the following to add an image:
--- title: "Monte Carlo" runtime: shiny output: flexdashboard::flex_dashboard: orientation: columns source_code: embed always_allow_html: yes --- ![Example](Example.png) img(src = "Example.png", height = 200, width = 200) <img src="Example.png" /> include_graphics("Example.png") tags$img(Example.png) fluidPage(tags$img(src="Example.png"))
I've tried all of these inside and outside of code chunks. The image is in the same folder that my RMD file is saved in. I've also tried putting it in a www subfolder.
The only one of the above that works is the first one. All of the other commands cannot find the image. When I use the first one, the image renders properly in the RMD file but disappears when I run the document.
This seems to be an issue with flexdashboard and RMD. Do I have to abandon these and start again in a regular shiny R file?