- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
每次我使用 renderUI(服务器端)和 uiOutput(UI 端)时,html 都是由 div 包装的,我怎样才能用 span 包装它呢?
例如:
用户界面方面:
tags$p(uiOutput("my_variable"))
服务器端:
output$currentLev1 <- renderUI({return(input$my_variable)})
结果:
<div id="my_variable" class="shiny-html-output shiny-bound-output">my_variable</div>
期望的结果:
<span id="my_variable" class="shiny-html-output shiny-bound-output">my_variable</span>
(只需按跨度更改 div)
感谢帮助
最佳答案
使用参数 inline=T
创建一个 span 而不是一个 div:
> args(uiOutput)
function (outputId, inline = FALSE, container = if (inline) span else div,
...)
NULL
等等:
> uiOutput("test", inline=T)
<span id="test" class="shiny-html-output"></span>
关于html - R Shiny : Change uiOutput wrapper,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42875740/
我在设计嵌套输入/输出应用时遇到了问题。 (我也试过把这个问题发到shiny-discuss,但是发的时候会被自动删除,为什么?) 我的应用程序可以简化为以下步骤: 按文本区域输入数据集。即:inpu
我在 server.R 中设置了 UI 以获得更多控制,但在 server.R 中定义时,shinyDashboard 不起作用。 我将此方法与 navBarPage 一起使用没有问题。 此代码有效
在我的应用程序中,我有一个模块嵌套在另一个模块中。父模块和子模块都使用 renderUI( slider )创建 UI 输出,并根据此 slider 的值过滤显示在 ggplot 上的数据。我在常规的
我正在尝试根据用户的 selectInputs 生成一个序列。现在的问题是序列的布局是垂直的。我的问题是如何水平或内联对齐它们。我尝试将 uiOutput 设置为 inline=TRUE,但它没有按预
uiOutput('myTable')其次是 p("Here is some text....")将文本放在 uioutput 旁边显示,但我喜欢从页面左侧开始在新行中打印文本。添加br()只是添加相
我正在尝试添加和删除 uiOutput元素使用索引来跟踪每个单独的元素。有一个actionButton用于向列表中添加和元素,以及 x 删除所选项目的每个元素的按钮,如下图所示: 我正在使用一个包含
每次我使用 renderUI(服务器端)和 uiOutput(UI 端)时,html 都是由 div 包装的,我怎样才能用 span 包装它呢? 例如: 用户界面方面: tags$p(uiOutput
@lz100 帮助我自动缩放 uiOutput()当我切换到显示/隐藏侧面板时。但是,当我实现 esquisserUI() ,当您在侧面板中的单选按钮之间来回切换时,与之关联的小部件会移位。 另一个问
我有一个非常基本的 Shiny 应用程序。 我正在使用 renderUI 和 uiOutput 来填充可以选择日期的 selectInput。 但如果用户通过单选按钮选择一个选项,我只希望 selec
我喜欢在 Shiny 的应用程序中单击键盘上的 Enter 键时触发操作按钮。当我将 actionButton 放入 ui 中时它可以工作,但与 uiOutput 一起使用时它不起作用。 librar
我正在使用 DTedit pckg 在 Shiny 的应用程序中显示数据框 (mydata),因为这个简单的 R pckg 允许我以非常简单的方式添加/编辑行。到目前为止,一切都很好。但是,我想在 V
我下面有 R Shiny 应用程序,我可以在浏览器中显示 uiOutput,现在我想添加 downloadHandler 以将 uiOutput 的内容下载到 HTML 文档。 下面是我的代码 lib
我正在尝试使用通过 Shiny 的下拉菜单插入和退出的 slider 制作一个响应式(Reactive) UI。我有一个带有响应式 UI slider 的服务器(server.R): library(
在 ui.R , 我放: uiOutput("singlefactor") 在 server.R , 我有: output$singlefactor <- renderUI({ selec
我正在尝试显示从 1 到 5 tabPanels在navbarPage在 Shiny 。 我的代码生成了 5 个图,但我希望用户能够选择他们想要访问的数量——在每个 tabPanel 中显示一个图。
我正在尝试将我的 shinydashboards 移植到 flexdashboard,但我遇到了在服务器端呈现的对象的问题。 在这个例子中,我有一个在服务器端呈现的输入选择器 output$weekl
我是一名优秀的程序员,十分优秀!