Hey,
Thanks for replying.
I understand it seems vague so I'll give an example with a code here.
Unfortunately, I've read the tutorials but can't seem to apply what I want.
Here is a code using dashboard shiny. it aims to upload two tables and then, with the action button to make the rownames of one table as the colnames of the other.
library(shiny)
library(shinydashboard)
# Define UI ----
sidebar <- dashboardSidebar(
sidebarMenu(
menuItem("load data", tabName = "input", icon = icon("dashboard")),
menuItem("choose parameters", icon = icon("th"), tabName = "parameters",
badgeLabel = "new", badgeColor = "green")
)
)
body <- dashboardBody(
tabItems(
tabItem(tabName = "input",
fileInput("input", "load table 1"),
fileInput("input", "load table 2"),
actionButton(inputId = "link_tables", "link the two tables together" )
),
tabItem(tabName = "parameters",
h2("take batches into account"),
selectInput("batches", "batches:",
colnames(coldata))
)
)
)
# Put them together into a dashboardPage
ui <- dashboardPage(
dashboardHeader(title = "Analysis app"),
sidebar,
body
)
# Define server logic ----
server <- function(input, output, session) {
observeEvent(input$link_tables, {
rownames( table2 ) <- table2$Sample_Number
colnames( table1 ) <- table2$Sample_Number
session$sendCustomMessage(type = 'testmessage',
message = 'proceed to the next tab')
})
}
# Run the app ----
shinyApp(ui = ui, server = server)
I'm obviously off here, but will be more than happy to get a tip on how to approach this.
Best