Closed crtahlin closed 10 years ago
See recent comment to #45 - if we adopt that strategy there is no need for having separate tabs with threshold - responses are thresholded and than analyzed as binary variables. Makes things more simple - would go for this option.
I'll make a list of rules here before I start work:
Data summary - OK as it is.
Timeline - hide whole tab if treatasBinary=TRUE
Distr. of the vars.: over time - profile plots - hide whole tab if treatasBinary=TRUE
Distr. of the vars.: over time - boxplots - hide whole tab if treatasBinary=TRUE
Distr. of the vars.: by measurement occ. - hide whole tab if treatasBinary=FALSE
Distr. of the vars.: by grouping var. - hide whole tab if treatasBinary=FALSE
Clustering: by measurement occasion - hide whole tab if treatasBinary=TRUE
RSC: by measurement occ. - hide whole tab if treatasBinary=FALSE
Logistf: by measurement occ. - hide whole tab if treatasBinary=FALSE
Selected data - OK as is.
Debug - OK as is.
My mistake - hiding of Tabs is not supported https://groups.google.com/forum/#!searchin/shiny-discuss/hiding$20tabpanel/shiny-discuss/W-rW08cjKFE/1xK9WBPdsZ8J. Will look into how to best do it.
Just display a message in the tab: This type of analysis is not appropriate for binary (or numerical) responses.
Ok, will try that.
Turns out to be quite messy (at least the way i tried it). Each graph/table/message has to have an extra if
clause to disable it. Then the height of the graph has to be set to 0, otherwise an ugly black placeholder gets drawn on the page, reserving the space for the graph. And off course the correct message has to be printed out.
While it is doable, it is quite bug-prone and a lot harder to maintain (will we remember to correct all three things when we change something?). I'll grab something to at eat and perhaps I'll get some insight how to do it. Otherwise I'll just do it this way this afternoon.
Produce an empty graph/table (or containing the message) instead and display that?
Implemented showing/hidding on all tabs along with some additional controls to avoid errors before the plots are generated. Done in fa5e034, c5ae3c8, 4d421c0, 8d0c07f .
Although the GUI is now friendlier, the code has become an if-clause extravaganza. Tried some try() functions, but renderTable() wouldn't accept their result. Didn't have to reaserch it further, but if time permits, it would be wise to rewrite the code to contain less if clauses.
We could create an empty message in a table, but then they would repeat several time (as many tables as there are in one tab). And each one would be a bit different (graphs vs tables, ggplot vs base plotting functions). Anyway, the dirty work is done now ;)
Tabs that have both threholded and other analysiis should be split - just add "/ with threshold".