【发布时间】:2020-11-24 00:26:36
【问题描述】:
我正在尝试将包含在 shiny 应用程序中的降价文档居中。
最小示例:使用名为 markdown_file.Rmd 的文件,其中包含以下文本:
---
output: html_document
---
# Test file
This is some text.
和一个非常基本的shiny 应用程序:
library(shiny)
ui <- navbarPage(
title = "Test app",
tabPanel(
"First tab",
mainPanel(
fluidPage(
includeMarkdown('markdown_file.Rmd')
)
)
)
)
server <- function(input, output) {}
shinyApp(ui = ui, server = server)
我们可以看到markdown文档在app中自动向左对齐。我希望它位于页面的中心,但文档中的文本仍然左对齐。我在这里尝试了最佳答案Centering images horizontally in a shiny fluidRow,但它只是将我在降价文档中的文本居中对齐,将实际文档留在页面左侧shiny。非常感谢这里的任何帮助!
【问题讨论】:
标签: r shiny format r-markdown markdown