Re: [R] Data Table not rendering properly using R shiny

2020-11-07 Thread Rui Barradas
Hello, Or maybe logical_idx <- max_usage_hours_per_region$Region %in% input$Region Another option is ?match Hope this helps, Rui Barradas Às 15:41 de 07/11/20, Jeff Newmiller escreveu: This looks odd... max_usage_hours_per_region[input$Region,] This would only work if you had rownames

Re: [R] Data Table not rendering properly using R shiny

2020-11-07 Thread Jeff Newmiller
This looks odd... max_usage_hours_per_region[input$Region,] This would only work if you had rownames on that data frame corresponding to the names of the Regions. This is a common R mistake... you probably need logical_idx <- max_usage_hours_per_region$Region == input$Region max_usage_hours_per

Re: [R] Data Table not rendering properly using R shiny

2020-11-07 Thread Marc Schwartz via R-help
Hi, Please drop R-Devel as a cc: from this thread for further replies. This topic is definitely not relevant there and cross-posting is not needed, but does require manual moderation. Thanks, Marc Schwartz > On Nov 7, 2020, at 10:23 AM, Bert Gunter wrote: > > Better to post on RStudio sup

Re: [R] Data Table not rendering properly using R shiny

2020-11-07 Thread Bert Gunter
Better to post on RStudio support, I think. Shiny is an RStudio package and product and this list if for R language/programming help. The two are separate. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breat

[R] Data Table not rendering properly using R shiny

2020-11-07 Thread Ritwik Mohapatra
Hi All, I have a data output as below.I want to display them in an interactive html report using shiny but the data table is not rendering properly and instead giving NA values. max_usage_hours_per_region<-setNames(aggregate(df3_machine_region$sum_as_hours~df3_machine_region$Region,df3_machine_re