is_device_desktop | R Documentation |
Convenience function that checks if the user's device is detected as desktop.
See get_device()
for details.
is_device_desktop()
Whether or not this user is on desktop
if (interactive()) {
library(shiny)
ui <- fluidPage(
shinybrowser::detect(),
"Are you on desktop?",
textOutput("result")
)
server <- function(input, output, session) {
output$result <- renderText({
shinybrowser::is_device_desktop()
})
}
shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.