Shiny

Adjust shiny textoutput

≡放荡痞女 提交于 2020-07-22 08:31:33
问题 Friends, could you help me adjust my output$ind of my code. My executable code is below. I would like to show the excluded industries, which refers to the variable that I called "ind_exclude". I did a textOutput to list these properties. However it is not working. Every help is welcome. library(shiny) library(rdist) library(geosphere) library(tidyverse) library(shinyWidgets) library(shinythemes) function.cl<-function(df){ #database df df<-structure(list(Industries = c(1,2,3,4,5,6,7), Latitude

Shiny deployment error: upgrade GEOS to 3.6.0 or later while installing package ‘lwgeom’

余生颓废 提交于 2020-07-22 06:12:43
问题 I have a shiny app that runs fine on my computer. I use packages sf , leaflet , and tmap . One of these requires the package lwgeom as a dependency. While installing the package lwgeom , shiny deployment gives me the following error message. What is GEOS ? And how can I upgrade GEOS to 3.6.0 or later? Building R package: lwgeom (0.2-4) /mnt/packages/build /mnt * installing to library ‘/opt/R/4.0.0/lib/R/library’ * installing *source* package ‘lwgeom’ ... ** package ‘lwgeom’ successfully

Rshiny Pass list of files to Javascript downloader

二次信任 提交于 2020-07-22 05:58:09
问题 I'm on the home stretch thanks to Stephane Laurent! I have an Rshiny app that generates a timeline based on a user selecting rows from a data table. The user can then download a zip file containing the table, the timeline, and hopefully the files associated with the rows selected in the table. I believe I need to pass the filenames from my Rshiny table to JS in order for JS to add the file URL's to a function for JSZip. The files are stored in my app directory under the www folder. so "https:

input$sidebarItemExpanded does not work with convertMenuItem in R Shiny

陌路散爱 提交于 2020-07-20 04:28:05
问题 For convertMenuItem, see reference here: https://stackoverflow.com/a/48212169 When I try to get the name of expanded menuItem, it doesn't work. Here's a standalone example: library(shiny) library(shinydashboard) convertMenuItem <- function(mi,tabName) { mi$children[[1]]$attribs['data-toggle']="tab" mi$children[[1]]$attribs['data-value'] = tabName if(length(mi$attribs$class)>0 && mi$attribs$class=="treeview"){ mi$attribs$class=NULL } mi } ui <- dashboardPage( dashboardHeader(),

Logo instead of application title Shiny

久未见 提交于 2020-07-19 11:58:22
问题 How can I put instead of title in Shiny app: navbarPage("title",theme = shinytheme("flatly"), tabPanel("Home", some logo in the size of menu tab? I tried this solution: How can I insert an image into the navbar on a shiny navbarPage() but someway is not working. Image too big overlay all menu items Thx 回答1: This is an old question but I was looking for a solution and the other ones I found caused issues when I tried to publish my application using shinyapps.io and this was due to the fact

docker nginx connection refused while connecting to upstream

ε祈祈猫儿з 提交于 2020-07-18 11:35:30
问题 I use shiny server to build a web-app on port 3838, when i use nginx in my server it works well. But when I stop nginx on my server and try to use docker nginx, I find the site comes to a '502-Bad Gate Way' error and nginx log shows: 2016/04/28 18:51:15 [error] 8#8: *1 connect() failed (111: Connection refused) while connecting to upstream, ... I install docker-nginx by this command: sudo docker pull nginx My docker command line is something like (for clear i add some indent): sudo docker run

Edit datatable in Shiny with dropdown selection for factor variables

半腔热情 提交于 2020-07-18 10:24:08
问题 I am trying to create a Shiny app that allows users to edit a datatable, whereby the edits are saved. Here is a minimal example: library(shiny) library(DT) ui <- fluidPage( DT::DTOutput('df') ) server <- function(session, input, output){ df <- data.frame(x = factor(c("A", "B", "C"), levels = c("A", "B", "C"))) output$df <- DT::renderDT(df, editable = T) proxy <- dataTableProxy("df") observeEvent(input$df_cell_edit, { info <- input$df_cell_edit str(info) i <- info$row j <- info$col v <- info

How to download Rhandsontable output into .xlsx and .pdf?

邮差的信 提交于 2020-07-18 08:41:25
问题 I would like to download rhandsontable output object from an R Shiny app into .xlsx and .pdf format. Does anyone have any idea how to do this? For example, I want to download the tables in the results tab in the app below (the codes are copied from my other question earlier): library(shiny) library(rhandsontable) ui <- navbarPage("App", tabPanel("Input", numericInput('num_of_table', "Number of sub tabs: ", value = 1, min = 1, max = 10), uiOutput("input")), tabPanel("Results", uiOutput(

How can I refer an action button to an inserted plot (insertUI/removeUI) in shiny

拜拜、爱过 提交于 2020-07-16 06:47:27
问题 I have asked this question in the RStudio community and didn't get help, so I try it here: I am trying to add the following functionality to my app: When the user inserts a plot, a remove button should appear that specifically removes the plot that was inserted at the same time. The app is based on insertUI and removeUI. This would be the example app. library(shiny) library(shinydashboard) # Example data a<-(letters) b<-rnorm(length(letters), 4,2) c<-rnorm(length(letters), 10,15) d<-c(1:10,20

How to hide or disable one item in pickerInput selection of multiple items

送分小仙女□ 提交于 2020-07-16 06:06:30
问题 I am trying to develop a shinydashboard application. As users select their dataset and variables, I provide the option to select the order, color and shape. However, in the pickerInput I am also providing another (4th) item which is the value of the variable selected for which the order, color and shape has been assigned. I need this 4th item/variable for further processing, such as, subsetting data. I would like to hide this 4th item or disable the option for users of the app to select, as