header=h6("Welcome to the webResearcher tool. This is an early alpha version to act as a proof-of-concept and in no way intended for wider public use."),
# sidebarPanel(
sidebar=bslib::sidebar(
open="open",
shiny::h4("Upload your dataset"),
shiny::conditionalPanel(
condition="output.has_input=='yes'",
# Input: Select a file ----
shiny::helpText("Analyses are performed on provided data")
),
shiny::conditionalPanel(
condition="output.has_input=='no'",
# Input: Select a file ----
shiny::fileInput(
inputId="file",
label="Choose data file",
multiple=FALSE,
accept=c(
".csv",
".xlsx",
".xls",
".dta",
".ods",
".rds"
)
)
),
shiny::conditionalPanel(
condition="output.uploaded=='yes'",
shiny::h4("Parameter specifications"),
shiny::radioButtons(
inputId="regression_auto",
label="Automatically choose function",
inline=TRUE,
choiceNames=c(
"Yes",
"No"
),
choiceValues=c(1,2)
),
shiny::conditionalPanel(
condition="input.regression_auto==2",
shiny::textInput(
inputId="regression_formula",
label="Formula string to render with 'glue::glue'",
value=NULL
),
shiny::textInput(
inputId="regression_fun",
label="Function to use for analysis (needs pasckage and name)",
value="stats::lm"
),
shiny::textInput(
inputId="regression_args",
label="Arguments to pass to the function (provided as a string)",
value=""
)
),
shiny::helpText(em("Please specify relevant columns from your data, and press 'Load data'")),