Commit 6677be01 authored by dmattek's avatar dmattek

Changed checks for NULL data to validate-need syntax.

parent ef30c0f0
......@@ -125,12 +125,6 @@ modAUCplot = function(input, output, session,
# Boxplot - display
output$outPlotBox = renderPlot({
locBut = input$butPlot
if (locBut == 0) {
cat(file = stderr(), 'aucPlot:Go button not pressed\n')
return(NULL)
}
plotBox()
......@@ -138,12 +132,6 @@ modAUCplot = function(input, output, session,
output$outPlotBoxInt = renderPlotly({
locBut = input$butPlot
if (locBut == 0) {
cat(file = stderr(), 'aucPlot:Go button not pressed\n')
return(NULL)
}
# This is required to avoid
# "Warning: Error in <Anonymous>: cannot open file 'Rplots.pdf'"
......@@ -180,13 +168,16 @@ modAUCplot = function(input, output, session,
plotBox <- function() {
cat(file = stderr(), 'aucPlot:plotBox\n')
loc.dt = in.data()
# make the f-n dependent on the button click
locBut = input$butPlot
cat(file = stderr(), "plotBox: on to plot\n\n")
if (is.null(loc.dt)) {
cat(file = stderr(), 'plotBox: dt is NULL\n')
return(NULL)
}
# Check if main data exists
# Thanks to solate all mods in the left panel are delayed
# until clicking the Plot button
loc.dt = isolate(in.data())
validate(
need(!is.null(loc.dt), "Nothing to plot. Load data first!")
)
cat(file = stderr(), 'plotBox:dt not NULL\n')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment