I am having a problem to align elements within fluidRow()
.
Below is a simplified example:
library(shiny)
ui <- fluidPage(
fluidRow(
column(8, align = "right", plotOutput("plot")),
column(4, align = "left", "Place me vertically centered.")
)
)
server <- function(input, output, session) {
output$plot <- renderPlot({
par(mar = c(3, 5.5, 1, 0)) # the 0 is important, to 'glue' both columns
hist(rnorm(1000))
})
}
shinyApp(ui = ui, server = server)
The result looks like this:
I would like it to look like this:
Can you help me to align the plot and text vertically centered, and to place the plot and the text as close to each other as possible? I tried using the align
argument but could not manage.
I really need two separate objects side by side, just typing the text inside the plot is not what I am looking for.
Thank you,
bruce