I created an R Shiny application that I'd like to share with my co-workers within my network. I tried hosting the app on my computer so that other users from the network could access it and use it with their data files.
I tried:
runApp("appname",host="0.0.0.0",port=3986)
And also:
runApp("appname",host="DNSMachinename")
The latter attempt resulted in the following error:
While my colleagues are able to acceess the app, it doesn't really run like it does on my machine. Thanks for the help.
If you are still trying to get buy-in for your server or cloud solution, I just finished developing the RInno package for this exact problem, i.e. when a company will not pay for Shiny Server or there are security concerns with cloud services.
To get started:
install.packages("RInno")
require(RInno)
RInno::install_inno()
Then you just need to call two functions to create an installation framework:
create_app(app_name = "myapp", app_dir = "path/to/myapp")
compile_iss()
If you would like to include R for your co-workers who don't have it installed, add include_R = TRUE
to create_app
:
create_app(app_name = "myapp", app_dir = "path/to/myapp", include_R = TRUE)
It defaults to include shiny, magrittr and jsonlite, so if you are using other packages like ggplot2 or plotly, just add them to the pkgs
argument. You can also include GitHub packages to the remotes
argument:
create_app(
app_name = "myapp",
app_dir = "path/to/myapp"
pkgs = c("shiny", "jsonlite", "magrittr", "plotly", "ggplot2"),
remotes = c("talgalili/installr", "daattali/shinyjs"))
If you are interested in other features, check out FI Labs - RInno
The shiny
tutorial list a number of ways to share your app. I particularly hosting a zip
file somewhere with the app, and letting your co-workers use runUrl
to automatically download the app and run it locally. In this way people can continue to run the latest version of the app, but it does not run on your machine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With