what is the rsconnect command to deploy a learnr site? - r

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/)

Related

Cannot publish a Flex Dashboard project from R Studio to shinyapps.io after upgrading to 2022.07.2 Build 576

From the Manage Accounts option of the Publish in RStudio I connect to my shinyapps.io account and click apply, then OK. Next, I click publish and get a dialog box for RStudio connect account. Before I upgraded, I did not get this option, I do not have the public URL of the RStudio connect server and I click cancel. I then click Publish and the Publish from list box has** no accounts connected** even though I connected to my shinnapps.io account from the manage accounts option. I have only been developing in R for a few weeks and would appreciate any suggestions to solve this issue.
A colleague suggested copying and pasting my code into a new template .rmd file and saving to a new location on my computer. You also can check to make sure runtime: shiny is in the YAML
These suggestions did not work, I got the same result.

How to use shinyShortcut package on linux

I am trying to create an shiny app for people that are not R users (they even may be frightened :D).
After the question about server/local app here (How to import remote csv file on a deployed shiny app?), I try to use the shinyShortcut package solution.
I did the following:
devtools::install_github("ewan-keith/shinyShortcut")
library(shinyShortcut)
shinyShortcut(shinyDirectory = "/home/cha/Server",
OS = "unix")
then I got :
So I have all that is normally required (at least that is what I think).
Since I never used the .desktop before, I ran the instruction here.
I put the .desktop on my desktop
Right click and change setting the tutorial did
I allow again from a right click and the .desktop disappears. Everything seemed ok.
However, when I double-clicked on the icon, nothing happened...
I tried to change the web browser or the application to launch it, nothing works.
What did I misunderstand ?
Thanks in advance
Charlotte (Ubuntu 20.04)

How to run a shiny app in IntelliJ (PyCharm)

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:

runExample() shows listening to server, but does not open any apps

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")

Shiny (Rstudio) apps not working

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

Resources