R 如何在按钮中包含动作链接';s标签?

R 如何在按钮中包含动作链接';s标签?,r,shiny,R,Shiny,我的目标是在selectInput按钮的标签中包含一个操作链接(显示帮助文本) library(shiny) ui <- fluidPage( br(), selectInput( inputId = "some_id", label = "Please choose A or B (get help)", choices = c("choice A", "choice B"), selected = "choice A", select

我的目标是在
selectInput
按钮的标签中包含一个操作链接(显示帮助文本)

library(shiny)

ui <- fluidPage(
  br(),
  selectInput(
    inputId = "some_id", 
    label = "Please choose A or B (get help)",
    choices = c("choice A", "choice B"),
    selected = "choice A",
    selectize = F
  ),
  actionLink(inputId = "action_link", label = "get help")
) # fluidPage

server <- function(input, output) {}

shinyApp(ui, server)
库(闪亮)

ui您还可以使用
标记
,例如
a
p

library(shiny)

ui <- fluidPage(
  br(),
  selectInput(
    inputId = "some_id", 
    label = p("Please choose A or B ",a("get help", href = "https://www.google.com/", target = "_blank")),
    choices = c("choice A", "choice B"),
    selected = "choice A",
    selectize = F
  )
) # fluidPage

server <- function(input, output) {}

shinyApp(ui, server)
库(闪亮)

ui这种方法对我来说是新的。当使用
updateSelectInput
时,你会怎么做?我尝试使用相同的
HTML
块,但它只打印
HTML
代码,而不是预期的
actionLink
library(shiny)

ui <- fluidPage(
  br(),
  selectInput(
    inputId = "some_id", 
    label = p("Please choose A or B ",a("get help", href = "https://www.google.com/", target = "_blank")),
    choices = c("choice A", "choice B"),
    selected = "choice A",
    selectize = F
  )
) # fluidPage

server <- function(input, output) {}

shinyApp(ui, server)