is_device_desktop {shinybrowser}R Documentation

Is the user on a desktop device?

Description

Convenience function that checks if the user's device is detected as desktop. See get_device() for details.

Usage

is_device_desktop()

Value

Whether or not this user is on desktop

Examples

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)
}

[Package shinybrowser version 1.0.0 Index]