Shiny

Basic example of fillPage in Shiny - How does it work?

↘锁芯ラ 提交于 2021-01-27 17:16:21
问题 i don´t get how i can get a plot to fill my dashboard completely (besides the header). I think i have to use fillPage, but i can´t get it to work. Here is my example. I´m thankful for any hints! ipak <- function(pkg){ new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])] if (length(new.pkg)) install.packages(new.pkg, dependencies = TRUE) sapply(pkg, require, character.only = TRUE) } packages <- c("tidyverse","shiny","shinydashboard","dashboardthemes","ggplot2") ipak(packages) #-------

Translate shiny app using shiny.i18n in modules?

房东的猫 提交于 2021-01-27 17:11:49
问题 Problem: I want to translate parts of a modularised shiny application either to German or to English. The package I want to use is shiny.i18n which seems to work in a non-modularized app and is seemingly easy to handle. However, in the below modularised shiny toy example the translation does not work. Any suggestions why this happens? Server/UI: library(shiny) library(shinydashboard) library(DT) library(data.table) library(shiny.i18n) i18n <- Translator$new(translation_json_path =

How can I prevent my Shiny App from disconnecting in a open-source shiny-server?

非 Y 不嫁゛ 提交于 2021-01-27 17:09:51
问题 I'm running a R shiny application on an open source shiny-server, using Ubuntu and NGINX. However, my app keeps getting the message "Disconnected from the Server" for some reason and I can't seem to get it to work. The shiny app runs perfectly fine on my local. I've tried the javascript workaround via the following suggestion in Shiny server session time out doesn't work, but it still doesn't seem to work. Also tried to set app_idle_timeout and app_init_timeout to a longer duration, but to no

R: In Shiny how do I fix no applicable method for 'xtable' applied to an object of class “reactive”

旧街凉风 提交于 2021-01-27 16:58:29
问题 I'm getting this error: Error in UseMethod("xtable") : no applicable method for 'xtable' applied to an object of class "reactive" UI.R library(shiny) shinyUI(pageWithSidebar( headerPanel("Test App"), sidebarPanel( textInput(inputId="text1", label = "Enter Keywords"), actionButton("goButton", label = "Go!", icon = "search") ), mainPanel( p('Your search:'), textOutput('text1'), p(''), textOutput('text3'), p('Search Results'), tableOutput('searchResult') ) )) Server.R library(shiny) data <- read

Disable an item in selectinput dropdown

守給你的承諾、 提交于 2021-01-27 14:47:24
问题 How do I disable an item in a selectInput() dropdown menu? For example; library(shiny) ui <- fluidPage(selectInput("id1","Select",choices=c("A","B","C"))) server <- function(input, output) {} shinyApp(ui, server) Say, for whatever reason, option C cannot be selected due to some logic. I would like the user to be able to see all the options, but have option C disabled/unselectable. 回答1: You can do this using pickerInput from package shinyWidgets : library(shiny) library(shinyWidgets) ui <-

wordcloud encoding in shinyapps

雨燕双飞 提交于 2021-01-27 13:56:14
问题 I deplyed my shiny code with wordcloud package. My local pc can shows perfectly but shinyapps show codes not characters. My local one is window with no UTF-8, and other local is Ubuntu with UTF-8 both can shows good. How can I fix it? sample code server.R library(wordcloud) function(input, output, session) { d1 <- c("강릉교동짬뽕","강릉선교장","강릉오죽헌","강문해변","경포대") d2 <- c(35,126,192,322,452) d3 <- data.frame(poi_name=d1, n=d2) spider_cloud <- d3 output$spider_cloud <- renderPlot({ wordcloud_tmp <-

Nginx: Proxy pass / proxy redirect to shiny web applications

≡放荡痞女 提交于 2021-01-27 13:32:08
问题 We are trying to update our internal server infrastructure and to proxy all accesses to our R shiny webservers through an Nginx server. Im able to get a response from the shiny server but Im not able to get related files like css/js through the Nginx server. Setup: 2 docker container (1 for hosting nginx, 1 running R for a shiny application) both docker container are members of an docker network shiny server listens to port 7676 (internal ip-adress 172.18.0.3) nginx server is hosting few

R Shiny - downloading a csv to the working directory

白昼怎懂夜的黑 提交于 2021-01-27 13:04:48
问题 I’ve got a Shiny app in which I’d like to accomplish the following: 1) User presses a button 2) A data frame gets exported to a .csv, saved in either the working directory (with server.R and ui.R), or ideally one level down. I want this to happen automatically, because eventually I’m going to connect it with a checkboxGroupboxInput to loop through the data and produce a set of filtered .csv. Here is the closest I can currently get, with fileToDownload representing my data frame: ui.R:

How to solve deployment error on shinnyappsio?

左心房为你撑大大i 提交于 2021-01-27 13:01:46
问题 I am trying to deploy my dashboard from Rstudio IDE by clicking Publish, but it returned me below error message: Error in inferAppPrimaryDoc(appPrimaryDoc = appPrimaryDoc, appFiles = appFiles, : Application mode static requires at least one document. Calls: ... withStatus -> force -> bundleApp -> inferAppPrimaryDoc Execution halted When I checked my shinyappsio dashboard, the apps was uploaded there but when clicked the url it showed 202 not found. Can someone help me to solve this issue?