This is a bit more complicated because there are so many code paths depending on what the experiment design is and what variables are significant. It may be best to generate the text for the code and then use eval() to evaluate it for the in app results and then just print it for both the display and the report, see #72. Something like:
GeneratePostHocCode <- function () {...} # returns a char
RunCode <- function() {eval(GeneratePostHocCode, environ=correct_env)} # returns list of results
This would be more similar to what Ian originally had.
This is a bit more complicated because there are so many code paths depending on what the experiment design is and what variables are significant. It may be best to generate the text for the code and then use eval() to evaluate it for the in app results and then just print it for both the display and the report, see #72. Something like:
This would be more similar to what Ian originally had.