From 3967a1b52ef56140f0e86137ce0caafa0fa30fef Mon Sep 17 00:00:00 2001 From: Lisec Date: Thu, 19 Oct 2023 12:22:56 +0200 Subject: [PATCH] Error fix in S report. --- R/page_stability.R | 9 ++++----- inst/app/www/reports/report_vorlage_stability.Rmd | 5 ++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/R/page_stability.R b/R/page_stability.R index 8f79648..5e4e2d4 100644 --- a/R/page_stability.R +++ b/R/page_stability.R @@ -69,10 +69,11 @@ page_StabilityUI <- function(id) { shiny::wellPanel( sub_header("Save Report"), shiny::downloadButton(ns("s_Report"), label="Download"), + shiny::p(), sub_header("Fig.S1 Options"), shiny::checkboxGroupInput(inputId = ns("FigS1_options"), label = NULL, choices = list("Average by Day" = "slope_of_means", "Annotate plot" = "show_legend")), - shiny::div(style = "margin: 0px;", shiny::radioButtons(inputId = ns("s_sel_dev"), label = NULL, choices = list("2s"="2s", "U_abs"="U"), inline = TRUE)), - shiny::radioButtons(inputId = ns("plot_type"), label = NULL, choices = list("standard"=1, "adjusted"=3), inline = TRUE), + shiny::div(style = "margin-top: -10px;", shiny::radioButtons(inputId = ns("plot_type"), label = NULL, choices = list("standard"=1, "adjusted"=3), inline = TRUE)), + shiny::div(style = "margin-top: -10px;", shiny::radioButtons(inputId = ns("s_sel_dev"), label = NULL, choices = list("2s"="2s", "U_abs"="U"), inline = TRUE)), shiny::checkboxGroupInput(inputId = ns("s_sel_temp"), label = "Use Temp level", choices = "", inline = TRUE), shiny::actionButton(inputId = ns("s_switch_arrhenius"), label = "Show Arrhenius", style = "width: 100%; max-width: 160px; font-weight: 700; background-color: rgb(0,175,240); margin-bottom: 10px;") ) @@ -239,9 +240,7 @@ page_StabilityServer <- function(id, rv) { output_file = file, output_format = rmarkdown::html_document(), params = list( - "Stability" = shiny::reactiveValuesToList(getValue(rv, "Stability")), - "xlab" = input$FigH1_xlab, - "precision" = rv$a_p("precision") + "Stability" = shiny::reactiveValuesToList(getValue(rv, "Stability")) ), envir = new.env(parent = globalenv()) ) diff --git a/inst/app/www/reports/report_vorlage_stability.Rmd b/inst/app/www/reports/report_vorlage_stability.Rmd index 2f8fb31..93d3ea7 100644 --- a/inst/app/www/reports/report_vorlage_stability.Rmd +++ b/inst/app/www/reports/report_vorlage_stability.Rmd @@ -29,8 +29,7 @@ if (testing) { } else { S <- params$Stability } -browser() -an <- unique(as.character(S[["data"]][,"analyte"])) +an <- as.character(S[["s_vals"]][,"analyte"]) ``` This is the table of uncertainties associated with Stability: @@ -62,7 +61,7 @@ for (i in 1:length(an)) { } ``` -This is the table of (non rounded) input data: +This is the table of (non rounded) input data from the original file ***`r S[["input_files"]]`***: ```{r FullData, echo=FALSE, comment=NA} DT::datatable(data = S[["data"]], rownames = NULL, options = list(dom = "t", paging = FALSE))