I think one you switch to "orientation: rows" you need to worry about defining columns more so than rows.
Please see the following example of a couple things I think you are trying to accomplish (I think i'm having trouble escaping the Rmd
):
title: "Dashboard"
output:
flexdashboard::flex_dashboard:
orientation: rows
runtime: shiny
library(dplyr)
library(flexdashboard)
Name=c('Test1', 'Test1', 'Test2')
Number = c(8, 9, 7)
zt <- data.frame(Name, Number)
PersonList <- sort(unique(zt$Name))
Selections {.sidebar}
selectInput("PersonSel", "Person: ", PersonList, selected = 'Test1')
Tab 1
Column {data-width=50}
Mean
renderValueBox({
cqi <- zt %>%
na.omit() %>%
filter(Name %in% input$PersonSel) %>%
summarize(avg_Number = round(mean(Number)))
valueBox(cqi, icon = "fa-users")
})
Column {data-width=100}
Median
renderValueBox({
cqi <- zt %>%
na.omit() %>%
filter(Name %in% input$PersonSel) %>%
summarize(avg_Number = round(median(Number)))
valueBox(cqi, icon = "fa-comments")
})
Median 2
renderValueBox({
cqi <- zt %>%
na.omit() %>%
filter(Name %in% input$PersonSel) %>%
summarize(avg_Number = round(median(Number)))
valueBox(cqi, icon = "fa-comments")
})
By setting the columns you can control which value block ends up in each one (Like the second median block in the right column above. Also by setting the {data-width = x} you can set how wide it should be in relation to the other column (exact size seems to be affected by the responsive nature of flexdashboard... I don't completely understand it).