Shiny rmarkdown flexdashboard images文件夹会删除自身

Shiny rmarkdown flexdashboard images文件夹会删除自身,shiny,r-markdown,knitr,flexdashboard,Shiny,R Markdown,Knitr,Flexdashboard,“我的图像”文件夹在首次编织文档后会自动删除 我在YAML标题中尝试了self_contained=TRUE,但不起作用 我不确定这是否会有所不同,但Shiny已嵌入到仪表板中 下面是我的代码: --- title : app demo author : yeshipants output : flexdashboard::flex_dashboard: orientation: rows self_contained : TRUE source_code: emb

“我的图像”文件夹在首次编织文档后会自动删除

我在YAML标题中尝试了self_contained=TRUE,但不起作用

我不确定这是否会有所不同,但Shiny已嵌入到仪表板中

下面是我的代码:

---
title : app demo
author : yeshipants
output : 
  flexdashboard::flex_dashboard:
    orientation: rows
    self_contained : TRUE
    source_code: embed
runtime: shiny
---

```{r setup}
knitr::opts_chunk$set(cache = FALSE)
```
```{r loadPackages, cache = TRUE}  
setwd("C:/Users/user/Desktop/Training/OCR")
library(magick)
```
Column {.sidebar data-width=350}
-------------------------------------
### Input & Parameters
```{r inputImages, cache = TRUE}

selectInput("imagesToChoose", 
            label = "Choose an image to process",
            choices = c("Language example 1", 
                        "Language example 2",
                        "Jounal example"),
            selected = "Language example 1") 
```
Row {.tabset}
-------------------------------------  
### Original Image    
```{r displayImage, cache = FALSE}    
renderImage({      
  if (input$imagesToChoose == "Language example 1"){
    list(src = "images/receipt.png", height = 240, width = 300)
  }
  else if(input$imagesToChoose == "Language example 2"){
    list(src = "images/french.JPG", height = 240, width = 300)
  }
  else if(input$imagesToChoose == "Jounal example"){
    list(src = "images/journal.jpg", height = 240, width = 300)
  }    
})

```

我认为你必须做到:

renderImage({      
  ......
}, deleteFile = FALSE)

谢谢Stephane!!我真的认为这是一个rmarkdown的东西,但它是一个闪亮的东西。谢谢你!