我有一个Shiny应用程序,其中有一个操作按钮,该按钮应该连接到Skype,以便人们可以直接与我聊天。下面是我尝试的代码,但是当单击操作按钮时,什么也没发生。
library(shiny)
library(shinydashboard)
rm(list=ls())
header <- dashboardHeader()
sidebar <- dashboardSidebar(
sidebarMenu(id = "menuChoice",
menuItem("Resources", tabName = "ResourcesMenu", icon = icon("leaf"),
menuSubItem("Filter Selection", tabName =
"LayoutSubMenu", icon = icon("angle-double-right")),
menuSubItem("Test", tabName = "Test2", icon = icon("globe")),
menuSubItem("Test 3", tabName = "Test3", icon = icon("wrench"))
),
menuItem("Trial Run", tabName = "TR", icon = icon("star"))
)
)
body <- dashboardBody(
uiOutput("TabSelect"),
#This action button is where I need help
a(actionButton(inputId = "phone",
label = "867-5309",
icon = icon("fab fa-skype", lib = "font-awesome")
),
href="skype:LastName, FirstName?chat"
)
)
ui <- dashboardPage(header, sidebar, body)
server <- function(input, output, session) {
output$TabSelect <- renderUI ({
selectInput(inputId = "LoadTab", "Available Tabs",
choices = c(input$menuChoice)
)
})
}
shinyApp(ui, server)