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)