From af5eee3a33164a7c2f9fea9e6d4dea57979d7d2d Mon Sep 17 00:00:00 2001 From: Costa <47926492N@ICO.SCS.local> Date: Thu, 17 Mar 2022 16:21:24 +0100 Subject: [PATCH] Relleno del visor - fase I --- BDAccess/app.R | 92 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 90 insertions(+), 2 deletions(-) diff --git a/BDAccess/app.R b/BDAccess/app.R index c262390..76a08e7 100644 --- a/BDAccess/app.R +++ b/BDAccess/app.R @@ -48,8 +48,17 @@ ui <- fluidPage( ) ), tabPanel("Visor", - sidebarPanel(), - mainPanel() + sidebarPanel( + radioButtons("nhc", label = h3("Código"), + choices = list("NHC" = 1, "UMID/OVID" = 2, "UM/OV"=3), + selected = 2), + textInput("id", label = "ID", value = ""), + ), + mainPanel( + htmlOutput("report"), + h3("Nitrogen"), + tableOutput("nitrogen") + ) ) ) ) @@ -443,6 +452,85 @@ server <- function(input, output) { ## Visor + output$report<-renderUI({ + samples<-sqlFetch(dta, "samples") + if (input$nhc == 1){samples_sel<-samples %>% filter(OVID == input$id)} + if (input$nhc == 2){samples_sel<-samples %>% filter(OVID == input$id)} + if (input$nhc == 3){samples_sel<-samples %>% filter(samples == input$id)} + + print(input$id) + print(samples_sel) + + if (input$nhc == 3){ + HTML(paste0( + " + + ", + "
Hist | +RNA | +Slide | +Frag | +Disg | + +
---|---|---|---|---|
",samples_sel$Hist_dic," | +",samples_sel$RNA_dic," | +",samples_sel$Slide_dic," | +",samples_sel$Frag_vial," | +",samples_sel$Disg_vial," | + " + )) + } + #**AP**: `r samples_sel$AP` + + #**Macro**: + # `r samples_sel$Macro` + + #**Despcripción**: + # `r samples_sel$Description` + + #**Procesado**: + # `r samples_sel$Process` + }) + + output$nitrogen<-renderTable({ + nitro<-sqlFetch(dta, "NITROGEN") + if (input$nhc == 3){nitro<-nitro %>% filter(CODIGO == input$id)} + else{nitro<-as.data.frame(matrix(ncol=0, nrow=0))} + nitro + }) }