Created
February 18, 2019 00:01
-
-
Save shaun-jacks/0f5d7e25587d2b48793d770cc5990db6 to your computer and use it in GitHub Desktop.
Example of using DT::datatable() to display facial detection results stored within values$img_res
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Within ui.R or renderUI() #### | |
DT::dataTableOutput("results") | |
#### Within server.R #### | |
output$results <- DT::renderDataTable({ | |
if (values$analysis_type == "FACE_DETECTION") { | |
as.data.frame( | |
list( | |
joy = values$img_res$joyLikelihood, | |
sorrow = values$img_res$sorrowLikelihood, | |
anger = values$img_res$angerLikelihood, | |
surprise = values$img_res$surpriseLikelihood | |
) | |
) | |
} | |
}, options = list(scrollX = TRUE, searching = TRUE, | |
scrollY = "600px", scrollCollapse = TRUE, dom = 'ft')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment