shiny-server

Reading objects from shiny output object not allowed?

懵懂的女人 提交于 2019-11-29 02:56:42
问题 I'm trying to write a little app that will allow the user to make a scatterplot, select a subset of points on the plot, then output a table in .csv format with just those selected points. I figured out how to get the page up and running and how to select points using brushedPoints. The table with selected points appears but when I press the Download button, the error "Reading objects from shinyoutput object not allowed." appears. Am I unable to download the table that I can visually see on

Reading javascript variable into shiny/R on app load

为君一笑 提交于 2019-11-29 00:39:04
What I want to do is get the user ID from a wordpress logged-in user when I load a shiny app in an iframe. This variable could then be used to save and modify user-specific data. I have gotten some of the way by adding the following code to the wordpress page: <?php global $current_user; get_currentuserinfo(); $user_name = $current_user->user_login; $user_ID = get_current_user_id(); ?> And then this to make it a javascript variable: <script type="text/javascript"> var username = <?php echo json_encode($user_name) ?> ; var userID = <?php echo json_encode($user_ID) ?> ; </script> Using the

Shiny R application that allows users to modify data

烈酒焚心 提交于 2019-11-28 20:27:38
This is not yet a practical question but rather a theoretical one. I was thinking of using Shiny to display some raw data in an interactive way. This is fine. However - is it possible to have users change the data that is displayed? Say, if I have a bunch of sliders for users to restrict the underlying data to satisfy certain conditions and have these observations displayed - is it possible to allow the users to make modifications to that data and have these modifications sent back to the server, which in turn saves these changes? I am thinking of scenarios where users may use a Shiny

Shiny: What is the option setting to display in the console the messages between server and ui

泪湿孤枕 提交于 2019-11-28 17:21:59
问题 I remember having used an option setting that enable to print in the R console the messages between the server and ui while a shiny app is running. This option is really useful to understand what is happening in the app. However I cant remember the name of that option and can not find it anymore in the documentation. Can someone can tell what is that option ? Thanks! 回答1: I finally found it : options(shiny.trace=TRUE) Before running the app. I find it extremely useful to understand what is

r shiny date range input to sql query

耗尽温柔 提交于 2019-11-28 11:47:15
I have a sql query below that works just fine. Select * from dbo.Employee where StartDate between '08/01/2014' and '08/31/2014' order by StartDate I am modifying this query such that it takes date input from shiny UI (daterange) . sqlQuery(myconn, paste("Select * from dbo.Employee where StartTime between", "'as.character(input$daterange[1])'", "and", "'as.character(input$daterange[2])'", "order by StartTime")) I get an error [1,] "22007 241 [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting date and/or time from character string." [,2] "[RODBC] ERROR: Could

Shiny rcharts multiple chart output

与世无争的帅哥 提交于 2019-11-28 10:20:28
How can I overwrite the output display options with running multiple charts with shiny and rchart so the output result is a 2x2 matrix type grid layout. require(rCharts) require(shiny) require(data.table) runApp(list( ui = mainPanel( span="span6", showOutput("chart2", "Highcharts"), showOutput("chart3", "Highcharts"), showOutput("chart4", "Highcharts") ), server = function(input, output){ output$chart3 <- renderChart({ a <- hPlot(Pulse ~ Height, data = MASS::survey, type = "bubble", title = "Zoom demo", subtitle = "bubble chart", size = "Age", group = "Exer") a$chart(zoomType = "xy") a$chart

Shiny R renderPlots on the fly

人盡茶涼 提交于 2019-11-28 08:40:48
I am trying to dynamically render multiple plots in a tab (better if this could be done across multiple tabs). After some search, I found this post is very helpful. But in my case, the number of plots is determined by the uploaded CSV file. So I think the question is how to call plotInput()$n_plot in a for loop? I appreciate any suggestions! At this moment, I am able to create multiples <div>s by calling renderUI . <div id="plot1" class="shiny-plot-output" style="width: 800px ; height: 800px"></div> <div id="plot2" class="shiny-plot-output" style="width: 800px ; height: 800px"></div> But I

Creating Shiny reactive variable that indicates which widget was last modified

左心房为你撑大大i 提交于 2019-11-28 08:09:44
问题 Let's say we have a set of widgets each with their own input label. How do we create a reactive object whose value is the character that represents the input ID of the last widget that was modified? For example, if we have ui.R shinyUI(fluidPage( textInput('txt_a', 'Input Text A'), textInput('txt_b', 'Input Text B") )) server.R shinyServer(function(input, output) { last_updated_widget <- reactive({ #hypothetical code that indicates ID value of last updated widget }) }) The desired result is

Shiny server session time out doesn't work

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 06:38:55
I have a shiny app deployed on a Linux server. I want the app to timeout if there is no activity for a minute. Based on what I read, I added the line app_idle_timeout to the shiny-server.conf file but I notice that it doesn't work. Can someone please advice how I can ensure that the session times out after a minute? Note: I do NOT have shiny server PRO. Below is what my shiny-server.conf looks like. Instruct Shiny Server to run applications as the user "shiny" run_as shiny; # Define a server that listens on port 3838 server { listen 3838; # Define a location at the base URL location / { # Host

User session is getting interrupted after approx. 45 seconds

女生的网名这么多〃 提交于 2019-11-28 06:24:33
问题 I have the shiny application deployed on the Rshiny pro server(1.5.2) . Application does some heavy computations and generates the report without any problem if it gets completed before approximately 45 seconds . If the computation and report generation goes beyond approximately 45 seconds, user's session / connection to the server is getting interrupted. Then automatically server is reconnecting the disconnected users almost immediately. After few seconds of re-connection the user session is