我有以下 ui.R
library(datasets)
# Use a fluid Bootstrap layout
fluidPage(
# Give the page a title
titlePanel("Telephones by region"),
# Generate a row with a sidebar
sidebarLayout(
# Define the sidebar with one input
sidebarPanel(
selectInput("region", "Region:",
choices=colnames(WorldPhones)),
hr(),
helpText("Some text and then some code.")
),
# Create a spot for the barplot
mainPanel(
plotOutput("phonePlot")
)
)
)
helpText()产生的地方:
<span class="help-block">
Some text and then some code.
</span>
如何修改helpText以便包含代码块:
<span class="help-block">
Some text and then <code>some code</code>.
</span>
答案 0 :(得分:3)
使用
helpText("Some text and then ", code("some code"), ".")