rstudio / flexdashboard

Easy interactive dashboards for R
https://pkgs.rstudio.com/flexdashboard/
Other
812 stars 301 forks source link

Hosting or Publishing a Flexdashboard .rmd file #41

Closed ndsubison2178 closed 8 years ago

ndsubison2178 commented 8 years ago

I have a basic test1.rmd file. I am wondering what is the equivalent of

runApp(shinyApp(ui, server), host = "0.0.0.0")

in Flexdashboard ?

When I open this test1.rmd app in a browser the default address in the browser ishttp://mylocal_ip:8021/test1.rmd

jjallaire commented 8 years ago

It's rmarkdown::run

You can host it on your local workstation (so long as the other folks on the LAN have access) or you can host it on a Shiny Server or shinyapps.io, see: http://rmarkdown.rstudio.com/authoring_shiny.html#deployment

On Sun, May 29, 2016 at 7:59 PM, ndsubison2178 notifications@github.com wrote:

I have a basic test1.rmd file. I am wondering what is the equivalent of

runApp(shinyApp(ui, server), host = "0.0.0.0")

in Flexdashboard ?

When I open this test1.rmd app in a browser the default address in the brower ishttp://mylocal_ip:8021/test1.rmd

I am interested in hosting this test1.rmd and test if its accessible to folks using other computers in the LAN.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rstudio/flexdashboard/issues/41, or mute the thread https://github.com/notifications/unsubscribe/AAGXxwfNbKQ_9RahSXKtxamr--BQ0h_Qks5qGihjgaJpZM4IpaPr .

ndsubison2178 commented 8 years ago

@jjallaire Thanks JJ.

datajules commented 5 years ago

I have a basic test1.rmd file. I am wondering what is the equivalent of

runApp(shinyApp(ui, server), host = "0.0.0.0")

in Flexdashboard ?

When I open this test1.rmd app in a browser the default address in the browser ishttp://mylocal_ip:8021/test1.rmd

Try to use rmarkdown::run, and add your IP adress and port.

rmarkdown::run("test1.rmd", shiny_args = list(host="0.0.0.0",port=5050))

paresh1982 commented 4 years ago

I'm not getting where to write this rmarkdown::run("test1.rmd", shiny_args = list(host="0.0.0.0",port=5050)) command for it to work.

b-rodrigues commented 3 years ago

Hi, same as paresh1982, where should this code go? I put it inside an app.R file, but it's not working. Trying to deploy flexdashoabrds on my own shiny server.

cderv commented 3 years ago

@b-rodrigues if you are using a shiny server (as in the product), you just have to deploy the Rmd file there and the product will run the rmarkdown::run() command for you. See https://docs.rstudio.com/shiny-server/#r-markdown

@paresh1982 the command rmarkdown::run is the one to exectute in a R session to have the file served using shiny runtime. You can type it in a R console, put it in a script and execute, or run in terminal using Rscript -e ...

b-rodrigues commented 3 years ago

Thanks @cderv , however, something's still not working. I have copied the old faithful example to make sure that the issue was not with my particular dashboard. I have my shiny server running on my raspberry pi, and you can access my apps here:

http://shinybrodriguesco.duckdns.org:3838/

as you can see, there are several apps. You can see that golem_demo works, as do both hello world apps. The newspaper app and the old_faithful are both flexdashboards, and neither work. Here's the directory tree on my server:

ubuntu@ubuntu:~/shiny-server/apps/old_faithful$ ls
index.Rmd

I installed shiny server through docker, following this tutorial, this means that the individual apps are not dockerized, only the shiny server product itself. Could this be the reason? I don't understand why standard shiny apps work and not the flexdashboards. Any further help really appreciated!

EDIT: by the way, for some reason I don't get any logs, so it's quite hard to understand what's going on