Shiny

DataTables DT: reset value of clicked cell

我怕爱的太早我们不能终老 提交于 2020-01-07 02:57:13
问题 I wanted to add the functionality of something happening after a table cell was clicked (e.g. open a modal). Because (suppose my dt is has the ID "dt") input$dt_cell_clicked stays the same until I click a new cell, I cannot execute the same event on re-clicking that cell. I tried working around it resetting input$dt_cell_clicked with javascript manually. This works, but there seems to be an internal updatemarker in DT that noticed I clicked the cell before and does not set the value of input

Save and Load user selections based on file selection - RShiny

馋奶兔 提交于 2020-01-06 18:42:09
问题 I am trying to create simple app that acts as a GUI for studying different files having same variables but with different version and content. I am unable to give an app where every time the user opens the app they dont have to enter in their parameters again where they left off. I'd like them to be able to save their parameters and bring them up again when they go back to the app. I am giving my sample code here, however the number of inputs and plots are far more in the actual app. I want

How to remove duplicate values in specific column without removing related row

馋奶兔 提交于 2020-01-06 14:25:17
问题 Want to remove duplicate values in specific column without deleting the rows related with duplicate column values as below example: Input ----- Date Market Quantity 4/2/2018 Indonesia 1000 4/2/2018 Australia 500 4/2/2018 India 300 4/2/2018 USA 500 4/2/2018 Germany 200 5/2/2018 India 400 5/2/2018 Japan 400 5/2/2018 Russia 457 6/2/2018 Austria 260 6/2/2018 Swiss 700 6/2/2018 USA 1200 6/2/2018 Indonesia 400 output ------ Date Market Quantity 4/2/2018 Indonesia 1000 Australia 500 India 300 USA

How to select rows of a matrix which has to meet mutiple conditions in R Shiny

拈花ヽ惹草 提交于 2020-01-06 14:07:35
问题 The goal is to build an application able to select and present only rows of a matrix that meets specific conditions selected by the user via Shiny elements such as checkboxes and sliderInput Our data is subject to two (or more) ways to be filtered: Via checkboxGroupInput where user can select one or more numbers Via sliders . There will be one slider for each column of data . This allows user to select the range of numbers for each column. I got stuck on making the data react to the selection

Passing column name via selectInput in shiny application

女生的网名这么多〃 提交于 2020-01-06 13:51:14
问题 I have a simple shiny app, I would like to pass the value from the selectInput as a column name of data frame and use it in ggplot. My UI code looks like that: library(shiny) # Define UI for application that draws a histogram shinyUI(fluidPage( # Application title titlePanel("Title"), # Sidebar with a slider input for the number of bins sidebarLayout( sidebarPanel( selectInput(inputId = "yaxis", label = "Y-axis", choices = list("Overall Rank" = "overall_rank", "Income Deprivation" = "income

How to pass data frame object from renderUI to eventReactive?

北城以北 提交于 2020-01-06 08:30:47
问题 I hope I am clear. I want to know how to pass user input data frame from renderUI to evenReactive in the server function. The problem is that in the eventReactive, ct is not found. Please advise ! My code is as follow: ui <- fluidPage( sidebarPanel( fileInput("file1", "Import", accept = c(".xlsx")), uiOutput("selectCAT"), actionButton("goBu", "Click!")), mainPanel("Display Results" tableOutput("acBTTON") )) server <- function(input, output, session) { output$selectCAT <- renderUI({ req(input

d3 all branches on top of each other vertical dendogram. r2d3 shiny

情到浓时终转凉″ 提交于 2020-01-06 07:41:28
问题 I want to make a vertical dendogram, however all branches are on top of each other, and I don't understand why. enter image description here this is a dendogram based on the flare dataset... The code is meant to go into a shiny app, and that is why i use r2d3. Not sure if this makes a huge difference as the .js doesn't show the proper tree anyway. the code I use right now is: // !preview r2d3 data = read.csv("flare.csv"), d3_version = 4 // Based on: https://bl.ocks.org/mbostock/4063570 var g

d3 all branches on top of each other vertical dendogram. r2d3 shiny

﹥>﹥吖頭↗ 提交于 2020-01-06 07:41:13
问题 I want to make a vertical dendogram, however all branches are on top of each other, and I don't understand why. enter image description here this is a dendogram based on the flare dataset... The code is meant to go into a shiny app, and that is why i use r2d3. Not sure if this makes a huge difference as the .js doesn't show the proper tree anyway. the code I use right now is: // !preview r2d3 data = read.csv("flare.csv"), d3_version = 4 // Based on: https://bl.ocks.org/mbostock/4063570 var g

In Shiny selectInput: to have many columns value et label with vertical align (and spaces not merged)

℡╲_俬逩灬. 提交于 2020-01-06 07:27:13
问题 I would like to vertical align some text in my dataframe. Therefore I would like kept more than one space in dataframe. toto<-'A B' toto df <- data.frame(name=character(), stringsAsFactors=FALSE) df[1,"name"]<-toto df but I get only one space at the end: 'A B' name A B (I have searched everywhere) 回答1: The initial goal was for selectInput() . I change a little the title. Here is quickly the solution I've found. I've not found a beautiful solution like escape of DT::datatable(df,escape=1) .

add text comments to a datatable in shiny

三世轮回 提交于 2020-01-06 07:17:14
问题 I'm trying to create a shiny app where user is able to add text comment to a table. I created a dataframe with 3 columns: num , id and val . I want my shiny app to do the following: select an value from id column (selectInput). add text comment in a text box (textInput) click on an action button A new column called comment is created in the data table, text comments are added to the comment column in the row where id equals the value selected. My shiny app code is below. When I select an