I am working on the Shiny tutorial for RStudio. I updated my RStudio, as indicated in the tutorial. The current version I have is 0.98.945. When I run the supplied examples like runExample("01_hello"), it opens my web browser and shows all the HTML content, but does not seem to be processing the R code.
When I proceed further in the tutorial for creating my own app runApp("App-1"), I get an error message on the web page: ERROR: could not find function "fluidPage". After some sleuthing, I found a posting on another site indicating that I need to download the developer version of shiny from GitHub, found here. I ran the code snippet for that installation -- and still no luck. Any suggestions would be greatly appreciated!
After updating Rstudio to the newest version redo the install.packages("shiny") and library("shiny"). Once you do this it should eliminate the need to manually do the runApp code and a button should appear were the run button usually is that says run app. before you can click run app though you have to set your working directory to the location were you have saved your server.R and ui.R by going to session -> set working directory -> choose directory. chose the folder location then click run app.
Edit: there should be no need for you to run that code from GitHub
I had the same problem. After installing shiny, I had to restart Rstuido for the "Run App" button to appear.
I had also some wired troubles when starting using shiny. Finally I got all fixed by removing all my previous libraries and installations and re-install only the latest versions
Related
I have a shiny app that I built using golem. The app is to be run locally on the user's computer, rather than on a shiny server. I deployed the package using the 03_deploy.R script that is automatically created by golem, using devtools::build() to build a new tar.gz. However, when I make changes to the app and redeploy it (create a new tar.gz), none of my changes appear. I also tried updating the version in the DESCRIPTION file, but that doesn't work either. The changes do appear if I change the name of the package.
How can I redeploy it, with the changes, without having to change the name of the package every time I want to update it?
Thanks!
It appears that my problem was on the installation end, not the building/deploying end. I needed to uninstall the earlier version of the package (remove.packages('mypackage')) and then restart my RStudio session.
I have a simple one-page learnr site containing several quizzes. It works fine and deploys fine when I press the Deploy ("Publish the application") button in rstudio IDE. I would like to be able to do this programmatically. I have tried commands like
rsconnect::deployApp(account="accountname",forceUpdate = T,lint=F,appPrimaryDoc = "quizzes/quizzes.Rmd")
which produce the same messages as pressing the button but the learnr site is not deployed correctly (it won't start, displaying the Please Wait message).
I can't find the correct command to deploy a learnr site. Does anyone know?
Use rsconnect::deployDoc instead (https://johannestitz.com/post/2022-04-14-how-to-deploy-learnr-tutorials-to-shinyapps-io-with-rsconnect/)
I am trying to deploy a Shiny app via https://www.shinyapps.io, but am experiencing difficulty. Note: things work fine locally on my machine.
Specifically, my app calls one of my R packages and runs said package under the hood. The package prompts a user to input a FASTA file via base::file.choose().
My problem is similar to the one outlined here
Error when using file.choose() in Shiny Web App (deployed online)
Is there a simple way to solve this without having to use shiny::fileInput()? I don't want to have to change any of my package code.
My app is here: https://hacsim.shinyapps.io/hacsim-rshiny-app/
To reproduce the error I get, click "RUN SIMULATION", then navigate to "Sub interface" and click "Run". A pop-up window should appear. Instead the error
character(0)
Error: An error has occurred. Check your logs or contact the app author for clarification.
appears in the Result panel.
Any help is welcomed and greatly appreciated.
I have a basic shiny app (ui.r and server.r) that I am able to run in RStudio.
But seems like I can't run it in IntelliJ.
I have installed the R language support plug-in and I can run r scripts.
But when I try to run ui.r, the only thing I get is html output in the console.
Does anyone recognise this? I probably forgot to configure something?
I do have experience running java (web) apps with IntelliJ. With tomcat setup e.g.
In the run configurations, I didn't see anything specific for a shiny server or something R related. So I guess that is not where I should search ...
Any idea? Is more information needed?
Thx in adavance.
edit:
The answer is here: https://youtrack.jetbrains.com/issue/R-895
To run a shiny App (R framework) on PyCharm you must enable R first and indicate where is the R interpreter located:
R options appears on the bar status. One of them is R Console. Click on it. Write getwd() command to see if you are in the root directory of the project. If not, set it with setwd() command:
Next, write runApp() and DO NOT press enter yet. You must press alt+enter and then click on load Shiny:
I am trying to learn Shiny in RStudio. Yesterday, I was going through some tutorials on the Shiny website and I could access all the example applications in the package and run them on RStudio locally. Today, when I go into RStudio and try and run the examples in Shiny, it shows Listening on http....(ip here) in the console but nothing opens. I can't find the answer anywhere.
The code is as follows:
library(shiny)
runExample("01_hello")