r - 如何将操作链接包含到按钮的标签中?
问题描述
我的目标是在按钮的标签中包含一个操作链接(显示帮助文本)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)
我想解决方案是使用label = HTML(...)
,但我不知道如何用纯 html 重写操作链接。
解决方案
selectInput(
inputId = "some_id",
label = HTML("Please choose A or B",
as.character(actionLink(inputId = 'action_link', label = 'get help'))),
choices = c("choice A", "choice B"),
selected = "choice A",
selectize = F
)
推荐阅读
- java - PDFBox 带渐变的虚线图案
- python - 如何结合 tf.map_fn 和 tf.split
- list - 使用 Prolog [] 问题移动列表 N 次:- Ivan Btrako 的练习 3.6 “人工智能的 Prolog 编程”
- ruby-on-rails - 如何保存设计表单中的附加信息?
- php - Php Array_filter 从数组数组中取消设置键值
- c# - 附加 SQL 数据库行为
- javascript - 使用 .map 的最佳方式
- locale - 很棒的 wm 不假设正确的语言环境
- mysql - SQL 错误:对于 VARCHAR(20),行大小太大
- css - Angular CSS样式没有改变