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

Continue to improve the output window #7979

Open rdstern opened 1 year ago

rdstern commented 1 year ago

The output window now takes html.

There remain some oddities reported here. (Though this has now been merged.)

Some remaining and new issues are mentioned below.

rachelkg commented 1 year ago

Hi @Patowhiz, Exciting progress on the output window!

So far, I have noticed a couple of oddities.

Thanks,

Rachel

2022-11-24_12-57-33 2022-11-24_12-58-10

rdstern commented 1 year ago

@Patowhiz and @ChrisMarsh82, we have now just finished the workshop for the Caribbean which went well. We now will continue with a contract with them for the next year.
It will be good if we can tell them that the next release includes some of the inconveniences they found. One of these was in the output window - and has been there for some time. I write without giving an example, but it is something that happens frequently - so is probably one you know. Sometimes, when doing an analysis that output window is blank and you are scrolled right to the bottom. You can either go up with the scroll bar, but it is usually quicker to return to the dialogue and repeat the Ok. Then you are positioned with the output.

Patowhiz commented 1 year ago

@rdstern thanks for feedback. Does that happen with any dialog or specific dialog? An example will help. Does it occur even in the latest version?

rdstern commented 1 year ago

@ChrisMarsh82 @Patowhiz and @N-thony The output window has now gone through its second major change, in accepting html. They both seem excellent. There is one small bug still, (mentioned below) but I wonder if a reflection from Chris, will be useful now, in addition to the possible minor adjustments that I mention below. I keep wondering about reproducible research and the role of these improvements in that direction?

  1. This is a remaining minor problem in the current release: Here is an example from the usual survey data and a simple frequency table, using Describe > Tables dialogue:

image

This is only for the first table produced. And the maximise button works fine. Here is the screenshot then:

image

If your first output is a pivot-table, then the black part is only part of the output on this first table. Graphs seem to display fine.

Here are some other topics (mainly tweaks) I would like to be considered

  1. I often want to select a group of items in the window. I can currently I think only select manually. Couldshift-click be an option to to select multiple items in the output window.
  2. Could there be a way of de-selecting all selected items. I sometimes find I am copying odd things to another window and then realise something I clicked ages ago , still remains selected. Possibly this is from a right-click menu, though I know Chris doesn't like them.
  3. I would sometimes like to copy output elsewhere that is not exactly a complete block. You may have a reason for not implementing Copy, but good to add it unless there are particular downsides?
  4. Consider add other items as well as Maximise. In particular, for (ggplot) graphs I wonder whether a plotly button would be useful?
  5. Once maximised you have included File > Save. Is there anything else to add here?

Here is the same thing from the R viewer:

image

Is there anything more to be added for your window. I thought Patrick mentioned more graph types?

  1. There is a Save button at the top of the Output Window. There is also the File > Save As > Save Output As... So (with also the Maximise Save, there are 3 options. The File > Save As is limited to rtf. Is that still correct? Are there changes needed here, or just clarification?

  2. We currently seem to have text or html in the output window. Our nice gt package for our tables also offers options of rtf, word, seemingly quite easily and also latex (if other packages are included). Will that be sensible to include?

rdstern commented 1 year ago

@ChrisMarsh82 Another common "feature" is that the output window sometimes appears blank. Here is an example: image

You can see from the position of the scroll-bar that I have already had to go up quite a long way to get from the blank output window to the end of the data. I am not sure, but I think I would like the output window to show the start of the new results I have just produced, rather than the bottom. So, I would then scroll downwards when there is a lot of output, rather than scrolling upwards?

rdstern commented 1 year ago

@ChrisMarsh82 and @Patowhiz I understand another current limitation of the html in the output window is that it can't take multiple tables. And this is meaning the 2 pull requests on the Describe > 2/3 variables > Summarise can't be completed.

Patowhiz commented 1 year ago

@rdstern it's a bit broader than that. The output system expects a single file at the .Net level. The dialog mentioned produces a list of objects. The intention is to find a way to combine the list of objects into a single object that can be produced as a file. Investigating that possibility is what I tasked @anastasia-mbithe and @Vitalis95. I did the same for the dialogs that produced a list of graph objects, by combining the graphs into a grid and plotting that grid object into a png file.

rdstern commented 1 year ago

@ChrisMarsh82 and @Patowhiz In January I gave a list - above - of suggestions for the output Window. I have since had discussions with @Patowhiz , and wonder whether there are other changes coming in time for the e-siac course (mid June) or perhaps the pro-ruwa course in mid August.

@ChrisMarsh82 I am also keen to know more about how you envision the existing system will be used? We are teaching beginners, who have to produce products. I would like to give some guidance. And I have yet to make any use of the multiple tabs we now have for the output window.

I notice that the Save in your menu saves an rtf file. Is this the same as the Save Output As in the File menu? Does it save the output window, or just a single tab? Now that's different to when I maximise. Then I save a graph as png and text output as txt.

I tyried saving the output window and it wouldn't let me. I am hoping your Save button in the output is a Save As till you have the name for the tab, and then you just click to update the Save? But I couldn't save - I'll try again, but it says

image

It says the same if I use File > Save As > Save Output As as well. (Update - the problem persists today, but I wonder if that is only wirg the development version. It worked on the latest released version.

Now I tried your Save in the output Window again. It seems to be a Save As. Could you change it into a Save? That would be good?

I like your Add to New and Add to Existing. So I'm thinking that a good way to work could be to copy anything I might use in my further results into a New Tab and gradually build up my report. Then maybe save that Tab regularly?

I still like the maximise output to investigate a particular output (and that is for any output, not just graphs. And the R-viewer gives me more options on viewing and saving the graph. But with then severe limitation that it is only for the last graph.

Patowhiz commented 1 year ago

@rdstern thanks for the reminder. Once @lloyddewit reviews and merges PR #8331 , I will spend some time to add more changes to the output window and hopefully have it merged in the next release. Copying outputs is high on my priority list because from user's perspective it is an easier way to transfer contents from one software to another. so expect that in my next PR. I'll have to amend existing structures to compliment what @ChrisMarsh82 had previously done. So I will try and prioritize that also. Viewing in Plotly is also high on my list.

Hopefully PR #8331 has fixed some scrolling issues?

rdstern commented 1 year ago

@Patowhiz and @ChrisMarsh82 I write to enquire on possible future improvements to the output windows.

Generally I am delighted with the output windows now and feel this is becomeing a selling point for R-Instat. So this is mainly questions on current limitations on aspects I don't know.

a) Graphs currently in the R-viewer only - not in the output window: The following code runs nicely in the script window.

library(FactoMineR)
## Tea example
 data(tea)
 data_book$import_data(data_tables=list(tea=tea))
 res.mca <- MCA(tea,quanti.sup=19,quali.sup=20:36)
summary(res.mca)

Here are the results, when run:

image

The penultimate line produces 5 graphs in the R graph viewer. Most commands use the Output window and then the Maximise window. Could they be used for this output?

And, the R graph viewer has a History tab, which is largely disabled. Could that be enabled, so the R viewer adds graphs, rather than opening a new window each time? Is this stack-overflow question relevant here?

You can see from the figure below that the graph windows are all available. If they can't come directly into the output window, could they be pasted in - at least as a stop-gap?

image

b) Other formats in the output Window:

Here is the Describe > Use Table dialog.

image

It uses the gt package which permits the output to be in multiple formats. The options are currently disabled. Do we have any options for the display, in the output window, or files to be saved, in these formats?

c) Commands that produce multiple outputs?

The Describe > 2/3 variables > Summarise currently prodiuces multiple tables and each is (currently) in a separate HTML output. Will we soon be able to handle this situation? Could they be appended into a single HTML or (as they use the gt package) could they output multiple tables in a way, e.g. rtf, that could accommodate the multiple tables in a single output?

d) Minor improvements

Some are mentioned above. For example we still have the black blob with the first output. Managing the checkboxes would also be welcome.

rdstern commented 10 months ago

@Patowhiz I am just updating this issue, so we can discuss some points during your visit. I hope there can be some quick wins. One would be to be able to copy from the window more flexibly than at present.

rdstern commented 6 months ago

@N-thony I was discussing improvements in this window with @ChrisMarsh82 and would now suggest that it is a good time to proceed with some simple changes.

I have also now managed to crash - I think - R-Instat by trying to copy in the output window. Here is a snapshot of the frozen R-Instat:

image

and now this:

image

Now I am not particularly worried about this bug, because I have a huge output window just now. But having clarified Chris's views about right-click menus I would like to see some of the simple improvements suggested above to this window.

This is particularly to be able to manage marking of the bits of output better. Namely being able to make a block of output - currently you can click on each checkbox, but shift-click doesn't yer work. And there is currently no easy way of clearing what is marked. Ideally I would also be able to mark a section of output and copy it to the clipboard, without it needing to be via the checkboxes.

Chris has explained that modern software has moved away from the right-click menu. However, the current R-Instat has no pretentions of being modern, and uses right-click menus in the other windows. So he is quite happy for it to use right click in the output window.

rdstern commented 6 months ago

@N-thony just adding to the list of improvements in the output window is the formatting of some of the output. There is an option in the Toole > Options > Output window as follows:

image

That would be nice to have the 4 figures Here is the mean yield from the rice survey:

image

:As you see it gives 13 decimal places.

rdstern commented 5 months ago

@N-thony I have copied here some of the additional (I hope also easy) improvements to the Output window:

Here are some other topics (mainly tweaks) I would like to be considered:

a) I often want to select a group of items in the output window. I can currently I think only select the check-boxes manually. Could shift-click be implemented as an option to to select multiple items in the output window? b) Could there be a way of de-selecting all selected items. I sometimes find I am copying odd things to another window and then realise something I clicked ages ago , still remains selected. Possibly this is from a right-click menu?, c) I would sometimes like to copy output elsewhere that is not exactly a complete block. There may have been a reason, earlier, for not implementing Copy, but good to add it unless there are particular downsides? d) Anything else like this?

There is currently no right-click on this window. I thought @ChrisMarsh82 was against it,but have since clarified that - if we modernise R-Instat, then we probably won't need right- click menus in the same way - perhaps not at all. But he is supportive of adding right-click to the current version.