last day (16 days later) » 

1:02 PM
1
A: Multiple sliders and Multiple button. But the Output is the same page

NpTSince in your selectedData you use: df[ df$Mon %in% input$range, ] you have only the values that are equal to input$range. Two approaches I can think of are: a) change your code to keep all the values between 1 and the input$range,i.e.: df[ df$Mon %in% 1:input$range, ] b) use the input...

 
NpT
what is the error that you see in the console. It is weird, since for me is working with both options.
@DevP, if you went straight for option 2, I have updated also my answer.
 
Perfect thanks. I have marked this answer as well
@NP it is working fine. Can I ask one question. I tried that but not getting, Can we add one actionbutton so that once I click only the table should get changed. So it should work this way. I select input values from slider and then click on action button, After this only the table should get reflected
 
NpT
you can achieve this, by adding an action button in your ui: actionButton('clickme', label = h6("Update")) and updating the selectedData from reactive to eventReactive in your server that is: selectedData <- eventReactive(input$clickme,{ df[ df$Mon %in% input$range[1]:input$range[2], ]})
 
Thanks and it is working. I am facing few challenges and sorry I did not know this would occur. I have edited my question for you. Now I have 2 sliders and 2 buttons corresponding to each day. When I select input values for MOnday and click Mon button the table should get reflected(Irrespective of values under Tuesday). When I select input values for Tuesday and click Tue button the table should get reflected(Irrespective of values for Monday)
 
NpT
Imho this is not the right way to go. I would create a dropdown list, of which dimension you want to change. Then I would use this input to update the selectedData. So with one dropdown, one range and one button, you get the flexibility you want.
 
1:02 PM
DId not get you? Can you please edit the code for me please?
I got your point little. So what if the range of dimensions are different; For example for Mon(SAy it is 1 to 100) and for Tue(Say it is 500 to 1000) In this case?
 
NpT
you have to update the sliderInput by using updateSliderInput
 
I tried but not getting
Here the problem the dimensions are column wise and we can render the table as per the dimension
Hi NpT. I am trying a lot to arrive at this. Appreciate if you could help me in this
 
NpT
Hi
 
hi
Hi NpT
Sorry for bothering you. It is little to solve i believe right?
 
NpT
1:21 PM
I think so also
but I am at work... so it is not easy to work on it
I will have a look later on and let you know
 
Sure thanks Dude :) Can I expect it within today?:) I can work on other stuff so
 
NpT
hopefully yes
 
 
2 hours later…
NpT
3:34 PM
library(shiny)
library(ggplot2)

df <- structure(list(Col = 1:11, Mon = c(47L, 110L, 31L, 72L, 129L,
41L, 85L, 123L, 14L, 152L, 118L), Tue
= c(164L, 168L, 146L, 140L,

185L, 77L, 26L, 15L, 23L, 116L, 101L), Wed = c(163L, 5L, 109L,

170L, 37L, 96L, 41L, 188L, 163L, 82L, 5L), Area = structure(c(1L,

1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 4L, 4L), .Label = c("A", "B",

"C", "D"), class = "factor"), Street = structure(c(1L, 1L, 1L,

1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L), .Label = c("Ste 1", "Ste 2"),
class =

"factor")), class = "data.frame", row.names = c(NA,
this is what I would do.
 
 
2 hours later…
5:09 PM
thanks may I know what is min=eval(parse is doing here?
 
 
2 hours later…
NpT
6:59 PM
At this point you need the minimum value for the range. Since this is dynamic depending on the selected dimension, we need a dynic way to ask for the minimum value. This is done by using the eval( parse(text case... In that we create a string that corresponds to a R command, that can be dynamic. This is inputted in the parse command that parses the string and creates the command, that is finally evaluated by the eval function. Try eval(parse(text="1+1")))
 

  last day (16 days later) »