Shiny

Editing multiple cells in a datatable in shiny

旧巷老猫 提交于 2020-01-05 04:15:06
问题 I asked this question earlier - Write editable shiny Datatable to .csv file Trying to edit cells in a shiny datatable and replace the original data with the edited data. I was able to figure out how to edit a single cell in the datatable, however if multiple cells are edited only the last edit is saved. Code: library(shiny) library(shinydashboard) library(tidyverse) library(DT) users <- reactiveFileReader( intervalMillis = 1000, NULL, filePath = 'appData/userTest.csv', readFunc = read.csv,

Draw bullets/circles on an Image given image coordinates

耗尽温柔 提交于 2020-01-05 03:46:07
问题 Hi I have a R shiny app displaying an image. I would like to draw a bullets/circles on an image based on image coordinates. The image coordinates are being read from a data frame where I would like to iterate over every row, plot and then remove the coordinates drawn for every iteration. I have something like this now #UI UI <- function(id) { fluidPage( useShinyjs(), fluidRow( column(width=12, box(title='Select', width = NULL, closable = TRUE, actionButton("draw", "draw")) )), fluidRow(width

Unresponsive slider

只谈情不闲聊 提交于 2020-01-04 18:39:28
问题 I have some data below and I would like to create sliders for years and months. I have a column with both the year and month. Also, I am new to shiny so this is quite new to me. Here’s what I tried: stack_qn <- structure(list(Date = c("2012-01", "2012-02", "2012-03", "2012-04", "2012-05", "2012-06", "2012-07", "2012-08", "2012-09", "2012-10", "2012-11", "2012-12", "2013-01", "2013-02", "2013-03", "2013-04", "2013-05", "2013-06", "2013-07", "2013-08", "2013-09", "2013-10", "2013-11", "2013-12"

print group name on clicking a data point in a hPlot chart with shiny

陌路散爱 提交于 2020-01-04 16:24:21
问题 I have a shiny application that shows some charts using the highcharts library in rCharts. In some cases I have multiple graphs on a single chart which are created using the group option in hPlot. I wish to print all the parameters of a single data point on a chart when clicking on it : the x,y and group values. I'm attaching the code in order to achieve that: ui.r: library(shiny) library(rCharts) shinyUI(bootstrapPage( showOutput("chart", "highcharts"), textOutput("Text") )) server.r:

zoomable image map in RStudio Shiny

前提是你 提交于 2020-01-04 14:15:26
问题 I have a static png file of several thousand pixels height and width, and I would like to visualize parts of if by interactively zooming in and out of it in an RStudio Shiny website. What is the best way to have this working in a way that is relatively well performing? 回答1: You can use any of a number of javascript libraries. I chose https://github.com/elevateweb/elevatezoom to use in this example: library(shiny) runApp( list(ui = fluidPage( tags$head(tags$script(src = "http://www.elevateweb

Resetting fileInput in Shiny App

你说的曾经没有我的故事 提交于 2020-01-04 11:10:41
问题 I have been trying for a long time to reset fileInput in a Shiny app and read solutions to similar problems, but my problem still persists. Most solutions ultimately lead to using Dean Attali's brilliant shinyjs package and the reset() function therein. Here's what my code looks like after following these instructions: library(shiny) library(shinyjs) library(xlsx) library(tidyverse) ui <- fluidPage( useShinyjs(), fileInput('inFile', 'Choose file'), actionButton('reset', 'Reset'), radioButtons

R shiny : checkboxGroupInput value

微笑、不失礼 提交于 2020-01-04 11:02:00
问题 I'm new to R and I have this code in Ui.R : library(shiny) ui <- shinyUI(fluidPage( titlePanel("Test 1"), sidebarLayout( sidebarPanel( checkboxGroupInput("sex", "sex", c("Men", "Women")), textOutput("number") ), mainPanel( ) ) )) And this code in Server.R : server <- shinyServer(function(session, input, output) { observeEvent(input$sex, { if (input$sex == "Men"){s<-1} number<-as.numeric(s) if (input$sex == "Women"){s<-2} number<-as.numeric(s) if (input$sex == "Men" & input$sex == "Women"){s<

Shiny renderPlot within Interactive Document opens a new Browser Window with dygraph

巧了我就是萌 提交于 2020-01-04 09:29:10
问题 I have the following RMarkdown .Rmd document. When you run the following, the sliderInput is "reactive" and adjust the smoothing appropriately; however, the plot keeps generating in a new separate browser window rather than within the document itself. Any ideas why this is happening or how to fix this behavior? --- title: "Untitled" output: html_document runtime: shiny --- ```{r echo=FALSE} library(dygraphs) sliderInput("span", label = "Select Span", min=0.05, max=1, value=0.5, step=0.05)

R Shiny - Disabling specific rows in a datatable with column sorting

末鹿安然 提交于 2020-01-04 06:18:10
问题 The app below contains a datatable of the iris dataset with row selection enabled. I would like to disable selection for the first 3 rows specifically. I can do this using the solution posted here. The solution works fine when the table initialises on app startup: However, when you sort the rows on a column, e.g. on Species in descending order, it disables observations 101, 102 and 103 since they are now the first 3 rows of the table as a result of the sorting: I am guessing this happens

Error message when deploying app to Shinyapps.io

五迷三道 提交于 2020-01-04 04:19:05
问题 When deploying my app (shinyapps::deployApp('path/to/your/app') , I get the following error message: error: Parsing manifest ################################## Begin Log ################################## ################################### End Log ################################### Error: Unhandled Exception: Child Task 30191454 failed: Error parsing manifest: Unsupported locale: it_NA.UTF-8 It looks like it's got to do with encoding, as I am from Italy. However I didn't use any strange