I have a shiny application that I used to call the rmarkdonw::render() function. I want to be able to show the knitting progress using the withProgress() function like here: https://gallery.shinyapps.io/085-progress/
The problem is I don't know how to get the progress status from 'render()' function. Any ideas?
Related
It seems like the graphics::locator() function can not be used inside a shiny app, anyone knows why it behaviors like that? The output of the function is displayed at the normal plot tab in RStudio, it does not show inside your app.
I am trying to include my code in my R Shiny app, as shown below, however, I am not able to find any way to do it! Here is my desired output, as you can see there is a app.R file that displays all of the code within an app:
my desired output
That can be done using the showcase mode.
Invoke runApp directly with display.mode="showcase":
shiny::runApp(display.mode="showcase")
I have gone through this but it does not answer the question.
using Source() in Shiny
I have a land use model in R Script that reads file from one input folder and does a lot of processing and generate outputs. Purpose of shiny is to modify inputs by increasing them by some percentage. My question is, if the model is not packed like a function and as just plain code, would it be able to run and give out required output. Thank you all in advance!
Your R Script needs to:
Be called (with source()) inside the server of your Shiny App.
Use the input$* for the inputs you need to modify.
Having both, there shouldn't be a problem for it to work. But, yes, converting your R Script to a function then sourcing it before the code for the UI would be much better and understandable. Even for you in the future.
I'm developing a Shiny application that provides interaction between a table with selection and a plot also with selection. When the plot is clicked to select a point, I would like to cascade that selection to the table. I've found this page (https://yihui.shinyapps.io/DT-proxy/) which describes exactly the process I'm trying to accomplish using dataTableProxy and selectRows functions. But even their example code does not work on my machine. I get an error saying "could not find function dataTableProxy"
I have version 0.1 of DT, shiny 0.12.2, shinydashboard 0.5.1, and R 3.1.2. Even looking at the DT documentation I see no mention of a dataTableProxy function.
I need to embed gvisMotionChart into an R markdown file and find an example interactive which is really helpful. However when it comes to the googlevis plotting I keep getting this error when I press the "run code" button:
connection to openCPU failed:
error
undefined
NetworkError: A network error occurred
Can anybody figure out the solutions?
Thanks in advance.
The googleVis package creates the javascript that has to be embedded into an HTML document in order for the interactive plot to run on a webpage. You won't be able to get it to work in the console or in Rstudio for that reason. The only way to know for sure if it's working is to knit it to HTML, and then publish it to Rpubs (or anywhere else online). Once it is online it will work. Depending on your browser settings, you might be able to get it to work by opening the HTML locally, but the browser often blocks the embedded plot when opened locally.
Without seeing your actual code, I can't provide you with anything more specific than that.
EDIT: I thought I would add that several months ago I made a markdown file detailing interactive plots in R for a class. You can find it here: http://rpubs.com/crmhaske/uwloo670_Interactive_Plots
If you scroll down to the very end you'll see the example I did using gvisMotionChart. You have to make sure the place where you print the graph is in it's own chunk, and that results is asis:
```{r results='asis'}
print(p,'chart')
```