Skip to content

Commit

Permalink
Improved dataTable for top hits
Browse files Browse the repository at this point in the history
  • Loading branch information
JoachimGoedhart committed Aug 26, 2020
1 parent e3050ca commit bdfbbe2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 28 deletions.
43 changes: 17 additions & 26 deletions app.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,7 @@ ui <- fluidPage(
checkboxInput(inputId = "hide_labels",
label = "Hide labels in the plot",
value = FALSE),
# checkboxInput(inputId = "user_selected",
# label = "User defined hits",
# value = FALSE),
#
# conditionalPanel(condition = "input.user_selected == true",
#
#
#
# NULL
# ),
#


radioButtons("adjustcolors", "Color (Unchanged,Increased,Decreased)", choices =
list(
"Grey, Red, Blue" = 1,
Expand Down Expand Up @@ -361,12 +350,13 @@ ui <- fluidPage(
height = 'auto',
# click = "clicked",
hover = hoverOpts("plot_hover", delay = 10, delayType = "debounce")),uiOutput("hover_info"),

conditionalPanel(
condition = "input.show_table == true",
h3("Top hits (based on Manhattan distance from origin)")),
withSpinner(tableOutput('toptable'))


conditionalPanel(
condition = "input.show_table == true",
h3("Top hits (based on distance from origin)"), withSpinner(dataTableOutput('toptableDT')))



),
# tabPanel("iPlot", h4("iPlot"), plotlyOutput("out_plotly")),

Expand Down Expand Up @@ -988,15 +978,16 @@ df_filtered <- reactive({

})

############## Render the data summary as a table ###########

output$toptable <- renderTable({

if (input$show_table == F) return(NULL)
df <- as.data.frame(df_top())

})
############## Render the data summary as a dataTable ###########

output$toptableDT <- renderDataTable(

df_top(),
extensions = c('Buttons'),
rownames = FALSE,
options = list(dom = 'Blfrtip', buttons = c('copy', 'csv','excel', 'pdf'), autoWidth = FALSE, lengthMenu = c(20, 50, 100)),
editable = FALSE,selection = 'none'
)

plot_data <- reactive({

Expand Down
4 changes: 2 additions & 2 deletions rsconnect/shinyapps.io/goedhart/VolcaNoseR.dcf
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ account: goedhart
server: shinyapps.io
hostUrl: https://api.shinyapps.io/v1
appId: 1844600
bundleId: 3187585
bundleId: 3347088
url: https://goedhart.shinyapps.io/VolcaNoseR/
when: 1590415810.85185
when: 1593761136.87077
asMultiple: FALSE
asStatic: FALSE
ignoredFiles: .gitattributes|LICENSE|README.md|VolcaNoseR_example1.png|VolcaNoseR_example2.png

0 comments on commit bdfbbe2

Please sign in to comment.