Whenever I make changes to Shiny Applications made through RStudio and which is hosted in shiny apps, I have to redeploy it which takes time. How can it this redeployment time be cut short. What automatic functionality or package can be added to achieve this?
Unfortunately there's not a way to reduce the time taken to deploy a package to ShinyApps currently. But we do recommend that you develop and test the package locally before deploying it to ShinyApps. That way you can iterate on your application very quickly by testing locally using the shiny::runApp() command then when you're happy with your application, deploy to ShinyApps.io.
Related
I've some shiny app and I want to execute and to make it standalone application (it will be awesome if it will open via chrome).
I can't upload the app to the Net and I want that also co-workers without R studio or R
will use this app.
because of the security company - I can't download any software except R packages.
I saw here a few solution, but all of them included any software download.
I have done some research on this issue. The commenters are basically correct: you need the R binaries in some way, either a portable R or an R server. But there are solutions that allow it to bundle those with your code and hide the details from your users.
On option is to wrap your app along with
a portable R into a container application like Electron. The electron-quick-start project tries this.
The RInno package provides functions to bundle your app and R portable into an installer app. Every user runs the installer on their system once which will install your app, the packages and the code. But in the end users may not see the difference to other apps. They get a link in the start menu and that's it. I did that successfully. But it did not work out of the box. I had to adjust the output manually in several places.
A second container solution works with docker. That is what ShinyProxy does. See also this blog.
The package shinyShortcut (I quote) "will produce an executable file that runs the shiny app directly in the user's default browser".
Important to note: I haven't tested most of them. From reviewing the solutions I often get the feeling that these solutions might make releases somewhat complicated because there are always manual steps involved.
I'm trying to get a shiny app deployed on Shiny Server. I can do that without any issues, but when trying to deploy an app that has a number of dependencies (remote and local) we keep running into issues.
We used renv to track the dependencies (on the Windows dev box) and rebuild it from scratch on the Linux prod box, but even though the dependencies are rebuilt and some get loaded, others do not. The .Rprofile of the user running the app is pointing to the renv activation script.
For the sake of clarity, we need and want all the R code to be built from the source code on the Linux box.
What is the best or standard way (or even a poor way that works) to deploy the libraries for a shiny app to the shiny server? Is renv even the right tool for this scenario or is there a better tool?
I've tried reading the shiny server documentation and the closes it only mentions that it uses the .Rprofile of the user running the app, but there doesn't seem to be any sort of guide on the best way to deploy dependent libraries.
This renv documentation discusses some reproducibility caveats:
system dependencies, and
changes in CRAN (e.g. a binary no longer being available).
Since you are moving from a Windows to a Linux system your packages may have unmet system dependencies (things that need to be installed outside of R) that you didn't encounter in Windows. For example, rJava is required for some of the Excel-related R packages, and getting its related system dependencies installed and working on Linux can sometime be a challenge. You can use the RStudio Package Manager Website to figure out what system dependencies are required for different R packages for your particular Linux OS. Also, the error messages you get when running these apps on Linux should point you in the right direction. These system dependencies are what you'll have to manage yourself since renv doesn't.
But for a more production-level solution you can try Docker and ShinyProxy. For apps with many dependencies or especially external dependencies (e.g. Python, SQL, etc.) you can guarantee more reproducibility using Docker. ShinyProxy can be used to host apps built into docker images. This is more work, but you ensure the entire system is reproducible, not just the R version and R packages. ShinyProxy also adds additional hosting capabilities like user authentication.
I am trying to find a way to make a FlexDashboard (using Shiny runtime) accessible to a colleague without access to the internet.
To provide my colleague with the full interactive experience (drop-down menus etc), I was thinking of simply installing R on my colleagues laptop and share the markdown script with them but does anyone know a way to lock the script for edits?
I just want to make sure that there is no accidental edits which might mess up the running of the markdown.
Look forward to hearing any inputs!
I would create a shiny application tweak it perfectly and then write a docker script to run they shiny application as an independent entity,
Your friend can use that docker container to run the dashboard and interact with it, but has no need of opening the script or anything else, just bake all the functionality into the shiny application and call the docker container and the flexdashboard will publish to a console.
I have a shiny app that works locally even as a shiny app. However when I deploy it in a Shiny Server(free) running on RedHat 5 within my organization, there are strange issues with gsub. To debug this, I would like to see the data at different instances in the shiny code. So, is there something like console.log as in javascript?
I checked the documentations like the one here http://shiny.rstudio.com/articles/debugging.html, but they talk only about a shiny app running within RStudio which is not my case.
Note:
1. The code that I want to use is not within the server function of the shiny app.
2. I cannot install new packages, because of IT restrictions
3. I don't have access to shiny server logs
Hope the question is clear.
I am developing a Shiny app at the moment and getting to a point with more functions than I expected. I plan to start automated testing with testthat and I would love to document my functions with roxygen2.
Since I am using RStudio, I started a new shiny app project. Now I am wondering, since I want the documentation and testing done, if I should instead start a package in RStudio to get all the devtools functions.
I am wondering, how to get the functions documented properly and like in the build, to test the examples. Plus using the testthat functions. How can I set up a project like this?
Since I found now a workflow which works for me, I described this on a different question.
developing shiny app as a package and deploying it to shiny server