IDEMSInternational / R-Instat

A statistics software package powered by R
http://r-instat.org/
GNU General Public License v3.0
38 stars 102 forks source link

Describe > View Graph #3834

Open rdstern opened 7 years ago

rdstern commented 7 years ago

The default is to view in the interactive viewer. I wanted to Display in R Viewer, which it did. But it doesn't seem to keep this option. When I returned to the dialogue it was back to Display in Interactive Viewer.

Second problem. I used the Describe > One Variable Frequencies on the 6 factors in the Sudan data. I then wanted to Describe > View Graph > Display in R Viewer. It doesn't give an error, but it doesn't display either.

lilyclements commented 7 years ago

To the first problem: I have fixed part of the problem. That is, it now it does not go to Interactive Viewer when you reopen the dialog (unless you had that checked beforehand!)

However, there is another problem which was hidden by this problem.

We have three (enabled) radio buttons, which run:

If I check R-Viewer, press OK and reopen - it, unsurprisingly, doesn't know what to check because two radio buttons fulfil the conditions. Similarly so for Output Window.

The difference between the R-Viewer and Output window isn't in the r-code, it's an option specified in the VB code. Therefore to my knowledge this fix isn't possible yet?

(If I disabled one of R-Viewer or Output window and ran it, then the radio buttons worked great, so I'm confident with my solution to fix Roger's problem)

To the second problem: The object created in One Way Frequencies (graph) isn't a ggplot object so this shouldn't be visible in this dialog. It's a "gtable" "gTree" "grob" "gDesc" object. A similar problem is seen with One Variable Graph if you use the "Combined Graph" option. I'm not sure how to fix this problem in the dialog - I know you can't get a base-R graph in this dialog so there is a specification somewhere.

dannyparsons commented 7 years ago

Yes there's no way to do the automatic detection of the radio buttons because it relies on VB options, not R code. We could just do all the code for these radio buttons manually to avoid this.

We could either detect the graph type and disable the Interactive option or have an informative error message.

lilyclements commented 7 years ago

disable the Interactive option? Let's not get too extreme now. We are having problems here with all the radio buttons for a "gtable" "gTree" "grob" "gDesc" object not just with the Interactive rdo.

Great, I'll fix this to be manual (I think I can still remember the old system).

dannyparsons commented 7 years ago

I meant disable interactive when the selected graph is not a gg type.

lilyclements commented 7 years ago

If the selected graph is not ggplot and is instead, for example, "grob" then the other radio buttons don't work anyway. It doesn't print my graph to the output window and it wouldn't give it in a separate window. This was what was occurring with @rdstern's second problem.

lilyclements commented 7 years ago

So we should disable just interactive in this case. We should disallow these objects in the receiver. However, that's the part I'm not sure how to do. It seems base R graphs currently are disallowed from the receiver so ideally we just extend this to include "grobs", "gDesc" etc

rdstern commented 6 years ago

Another bug in the view graph is that when I change to view in the R viewer it works fine. But it then changes it forever, not just for that graph. I then have to use Tools > Options to change it back again to the output window.