ROUT report cleaned up, outlier table and Q-valus added
This commit is contained in:
1 parent
0eba5831b6
commit
e263ba66e4
3 files changed
+105
-78
No files matched your search
@@ -338,7 +338,8 @@ server <- function(input, output, session) {
|
||||
"Adjust the slider to mark the suspected outliers. Mostly, a Q-value of 2% is sufficient.",
|
||||
"If the general variability of the data is high, many datapoints will be flagged, also ones that are not deemed to be outliers",
|
||||
"An indicator for high variability is, when the Q-value needs to be increased above 5%, to flag suspected outliers.",
|
||||
"Then, please re-consider, if the suspected outlier is not 'just' normal variability."
|
||||
"Then, please re-consider, if the suspected outlier is not 'just' normal variability.",
|
||||
tableOutput("ANOVA_ROUT")
|
||||
),
|
||||
tabPanel(
|
||||
"parameter estimates",
|
||||
@@ -576,13 +577,13 @@ server <- function(input, output, session) {
|
||||
" CI for difference of slopes:",
|
||||
tableOutput("SlopeDiffCIMeta"),
|
||||
)
|
||||
),
|
||||
tabPanel(
|
||||
"Report",
|
||||
h4("Settings for report"),
|
||||
downloadButton("downloadXLReportMeta", label = "Download PDF report", class = "butt"),
|
||||
tags$style(type = "text/css", "#downloadXLReportMeta {background-color: orange; color: black;font-family: COurier New}"),
|
||||
)
|
||||
) #,
|
||||
# tabPanel(
|
||||
# "Report",
|
||||
# h4("Settings for report"),
|
||||
# downloadButton("downloadXLReportMeta", label = "Download PDF report", class = "butt"),
|
||||
# tags$style(type = "text/css", "#downloadXLReportMeta {background-color: orange; color: black;font-family: COurier New}"),
|
||||
# )
|
||||
)
|
||||
)
|
||||
# )
|
||||
@@ -822,6 +823,9 @@ server <- function(input, output, session) {
|
||||
##### ROUT outlier testing ----
|
||||
#browser()
|
||||
if(!is.null(input$Qslider)) {
|
||||
|
||||
|
||||
|
||||
all_lROUT <- all_l[complete.cases(all_l),]
|
||||
colnames(all_lROUT) <- c("log_dose","sample","y","isRef","isSample","conc")
|
||||
res <- rout_4pl_potency(all_lROUT, Q=input$Qslider/100)
|
||||
@@ -870,6 +874,9 @@ server <- function(input, output, session) {
|
||||
REP$ROUTplot <- ROUTplot
|
||||
|
||||
ANOVA_ROUT <- ANOVA4plUnresfunc(ro_new = ro_newROUT)
|
||||
output$ANOVA_ROUT <- renderTable({
|
||||
ANOVA_ROUT
|
||||
})
|
||||
REP$ANOVA_ROUT <- ANOVA_ROUT
|
||||
|
||||
Limite <- list(
|
||||
@@ -915,6 +922,8 @@ server <- function(input, output, session) {
|
||||
|
||||
|
||||
REP$BendsROUT <- BendsROUT
|
||||
REP$Qslider <- input$Qslider
|
||||
REP$OUTs_ <- OUTs_
|
||||
}
|
||||
|
||||
|
||||
@@ -2959,43 +2968,43 @@ server <- function(input, output, session) {
|
||||
|
||||
#### download Meta 4PL report----
|
||||
|
||||
observeEvent(input$btn2, {
|
||||
if(!Dat$FITsFlag) {
|
||||
runjs("$('#downloadXLReportMeta')[0].click();")
|
||||
} else {
|
||||
showModal(modalDialog(
|
||||
title = "No 4PL model to Download",
|
||||
"Please select other data before download.",
|
||||
easyClose = TRUE,
|
||||
footer = NULL
|
||||
))
|
||||
}
|
||||
})
|
||||
|
||||
output$downloadXLReportMeta <- downloadHandler(
|
||||
filename = paste0("Report_4PLEvaluation", Dat$RepIdentifier, ".pdf"),
|
||||
content = function(file) {
|
||||
tpdr <- tempdir()
|
||||
tempReport <- file.path(tpdr, "Doc_BioassayReport.Rmd")
|
||||
file.copy("Doc_BioassayReport.Rmd", tempReport, overwrite = T)
|
||||
|
||||
tempReportc <- file.path(tpdr, "logov2.png")
|
||||
file.copy("logov2.png", tempReportc, overwrite = T)
|
||||
|
||||
rmarkdown::render(tempReport,
|
||||
output_file = file,
|
||||
params = list(
|
||||
FileName = Dat$FileName,
|
||||
author = Dat$Author,
|
||||
NoP = Dat$NoP,
|
||||
Assay = Dat$Assay,
|
||||
REP = REP,
|
||||
coeffs = Dat$coeffs_UN
|
||||
),
|
||||
envir = new.env(parent = globalenv())
|
||||
)
|
||||
}
|
||||
)
|
||||
# observeEvent(input$btn2, {
|
||||
# if(!Dat$FITsFlag) {
|
||||
# runjs("$('#downloadXLReportMeta')[0].click();")
|
||||
# } else {
|
||||
# showModal(modalDialog(
|
||||
# title = "No 4PL model to Download",
|
||||
# "Please select other data before download.",
|
||||
# easyClose = TRUE,
|
||||
# footer = NULL
|
||||
# ))
|
||||
# }
|
||||
# })
|
||||
#
|
||||
# output$downloadXLReportMeta <- downloadHandler(
|
||||
# filename = paste0("Report_4PLEvaluation", Dat$RepIdentifier, ".pdf"),
|
||||
# content = function(file) {
|
||||
# tpdr <- tempdir()
|
||||
# tempReport <- file.path(tpdr, "Doc_BioassayReport.Rmd")
|
||||
# file.copy("Doc_BioassayReport.Rmd", tempReport, overwrite = T)
|
||||
#
|
||||
# tempReportc <- file.path(tpdr, "logov2.png")
|
||||
# file.copy("logov2.png", tempReportc, overwrite = T)
|
||||
#
|
||||
# rmarkdown::render(tempReport,
|
||||
# output_file = file,
|
||||
# params = list(
|
||||
# FileName = Dat$FileName,
|
||||
# author = Dat$Author,
|
||||
# NoP = Dat$NoP,
|
||||
# Assay = Dat$Assay,
|
||||
# REP = REP,
|
||||
# coeffs = Dat$coeffs_UN
|
||||
# ),
|
||||
# envir = new.env(parent = globalenv())
|
||||
# )
|
||||
# }
|
||||
# )
|
||||
|
||||
|
||||
#### download Wizard report ----
|
||||
|
||||
Reference in new issue
Block a user