Hi there,
In shiny apps, the working directory is automatically set to the root directory of the app. And for R markdown, when rendering (also running a shiny doc), the working directory is set to the one which contains the Rmd files.
When I embed a shiny app to a markdown document by shinyAppDir, problems arise: the working directory is set according to the Rmd logic for both R chunks and for shiny app, path I used in shiny apps to import local data need to be changed. In this case I cannot use one app as stand alone as well as embedded one. I can write some code to work around but it becomes complex.
In short, working directory is `APP_ROOT` for shiny apps, but when run as an embedded app in a R markdown, the working directory is different, which is not convenient.
Besides that, I’m considering:
how about store some metadata of shiny.app class? For example the app name.
I prefer to embed shiny apps into a R markdown document, instead of writing text within shiny apps. In this circumstance, the first problem is the working directory I mention earlier. The next one is, when writing a report, we are usually using the same data set and basic logic, we explore different aspects of a single task. So if I write something and embed a shiny and then write something, I have to embed another shiny app. But the long report may be depend on the same dataset and process. What about one server, many ui.R? It seems that design is now bind to server, but isn’t it the right way to bind design to logic but isolate from server?