Hello there,
I am brand new to Shiny (two years experience in R Studio), and I want for my fluidRow() headers to have some space between the confines of the app window, similar to the way the title is shown below.
For example, I would like "Upload Data" to have the same alignment as "Microcystin Concentrations from ELISA using 5 PL Curve." I have tried adding spaces to the text itself, but it didn't work.
Is there a way to move the header so that it sits in the same alignment as the main app title?
library(shiny)
ui <- fluidPage(
titlePanel("Microcystin Concentrations from ELISA using 5 PL Curve"),
fluidRow(
h4("Upload Data")),
column(10,
fileInput("file", "Choose CSV File",
multiple = F,
accept = c("text/csv",
"text/comma-separated-values,text/plain",
".csv"),
placeholder = "CSV files only",
width = "100%"))),
fluidRow(
h4("Preview Data"),
column(10,
numericInput("n", "Rows to Preview", value = 5, min=1, step = 1))),
fluidRow(
column(10,
tableOutput("contents"))),
fluidRow(
h4("Standards"),
column(12,
tableOutput("standards"))
)
)
server <- function(input, output, session) {
data <- reactive({
req(input$file)
read.csv(input$file$datapath)
})
stds <- reactive({
data() %>%
filter(Type == "Standard")
})
output$contents <- renderTable({
head(data(), input$n)
})
output$standards <- renderTable({
print(stds())
})
}
shinyApp(ui, server)
Thank you so much for any help!