Image not showing in Shiny app R

前端 未结 4 1115
失恋的感觉
失恋的感觉 2020-12-02 00:14

I have an image i\'d like to embed into my shiny app, and have read as much as I can find on how to do it. Although, all I get is a blue question mark when I run my code.

相关标签:
4条回答
  • 2020-12-02 00:32

    I was having the same problem. To solve this, just create a folder named 'www' in the same folder as your app.R script and put the images within that folder.

    I found the solution to this problem in the tutorial video in this page: Shiny Tutorial Video - Adding Static Content Watch from 1h45min00sec.

    0 讨论(0)
  • 2020-12-02 00:33

    After coming back to this problem, I found that the solution is to simply format the Shiny code properly, by naming the R file app.R, and clicking Run App as opposed to selecting all of the code and running within the console.

    Not sure how or why this makes a difference, but the numerous Shiny applications I have worked on since have all been resolved when doing this.

    0 讨论(0)
  • 2020-12-02 00:41

    Just a note that may be helpful to someone else, it just happened to me: please double check if your app.R is in the root directory. I.e, app.R is on the same level as the www folder. I know it seems trivial, but if you (as I just did) put app.R into a subfolder and click Run App, the app can still run, just without the pictures.

    0 讨论(0)
  • 2020-12-02 00:45

    You should check if the name of your R code file is called “app.R" instead of called xxx.R. this error also happened to me

    0 讨论(0)
提交回复
热议问题