How can I launch the Shiny App, "my_shiny" through the terminal.
Also, how do I terminate or close the app through the terminal only.
To run a Shiny application from the RStudio IDE, click on “Tools” in the menu bar. Then, select “Terminal” followed by “New Terminal”. This will open a terminal tab next to your R console.
You might be eager to deploy your Shiny app to a remote server. But the simplest way to run a Shiny app is to run it locally. You only need the shiny R package installed, and you can run the app in your browser. In this post you'll see a few ways of how to organize your files to be served locally.
If you are visiting a web hosted Shiny app through your browser using the web address of the app then you don't need R installed in your computer otherwise you do. What background does one need to learn R?
Publish your Shiny App to RStudio ConnectAt the top of the editor, click Publish. In the Publish to Server window, confirm that your account is shown in the Publish To Account section and click Publish. You can monitor the status of the deployment in the RStudio IDE Deploy pane.
Try this:
Rscript -e 'library(methods); shiny::runApp("my_shiny/", launch.browser = TRUE)'
Or shorter:
R -e "shiny::runApp('my_shiny')"
If you want to specify a port:
R -e "shiny::runApp('my_shiny', port = 3838)"
As with most other commands, you can interrupt the process with Ctr
+ C
.
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