is_device_mobile {shinybrowser} | R Documentation |
Is the user on a mobile device?
Description
Convenience function that checks if the user's device is detected as mobile.
See get_device()
for details.
Usage
is_device_mobile()
Value
Whether or not this user is on mobile
Examples
if (interactive()) {
library(shiny)
ui <- fluidPage(
shinybrowser::detect(),
"Are you on mobile?",
textOutput("result")
)
server <- function(input, output, session) {
output$result <- renderText({
shinybrowser::is_device_mobile()
})
}
shinyApp(ui, server)
}
[Package shinybrowser version 1.0.0 Index]