1
私は各リストに文字列を含むリストオブジェクトを持ち、各リスト要素の各文字列は段落を表します。私は光沢のあるアプリケーションで結果を表示しようとしています。そこでは、各段落を別々に(新しい行を挟んで)表示できますが、これを行う方法があるかどうかはわかりません。Rでテキスト表示を書式設定する方法Shiny?
は、ここで私がこれまで持っているものです。
shinyUI(
fluidPage(
# Application title.
titlePanel("M&A Clearing House"),
sidebarLayout(
sidebarPanel(
# Copy the line below to make a text input box
textInput("company", label = h3("Company Name"), value = "Enter text..."),
selectInput("year", "Choosing Year Range",
choices = c("2014", "2015", "2016"),
selected="2015", multiple=T),
actionButton("submit","Submit")
),
mainPanel(
tabsetPanel(
tabPanel("All results", textOutput("allresult"))
)
)
)
))
shinyServer(function(input, output, session) {
# ....assuming the result generated would look like this:...
# exampletext <- list()
# exampletext[[1]] <- "this is a paragraph"
# exampletext[[2]] <- "this is another paragraph"
# exampletext ....assuming the result generated would look like this:...
output$allresult <- renderPrint({
return(unlist(exampletext()))
}
)
})