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

Display warnings in R-Instat? Is the pander package relevant? #4365

Open rdstern opened 6 years ago

rdstern commented 6 years ago

This message was originally questioning the possible relevance of pander. This had no response. It may still be relevant, so I continue in this thread, but my interest now is particularly that R-Instat does not display warnings. It is important that it should, if it could, so I ask that in this thread. Roger (added 26/01/2024)

The pander package is described as "Contains some functions catching all messages, 'stdout' and other useful information while evaluating R code". I wonder if its evals function - in particular - might be useful for us? The vignette https://cran.r-project.org/web/packages/pander/vignettes/evals.html on the evals function states that it is to:

The vignette starts by:

evals is aimed at collecting as much information as possible while evaluating R code. It can evaluate a character vector of R expressions, and it returns a list of information captured while running them:

src holds the R expression, result contains the raw R object as-is, output represents how the R object is printed to the standard output, type is the class of the returned R object, msg is a list of messages captured while evaluating the R expression. Among other messages, warnings/errors will appear here. stdout contains what, if anything, was written to the standard output. Besides capturing evaluation information, evals is able to automatically identify whether an R expression is returning anything to a graphical device, and can save the resulting image in a variety of file formats.

Another interesting evals feature is caching the results of evaluated expressions. Read the caching section for more details.

evals has a large number of options, which allow users to customize the call exactly as needed. Here we will focus on the most useful features, but the full list of options, with explanations, can be viewed by calling ?evalsOptions. Also evals support permanent options that will persist for all calls to evals, this can be achieved by calling evalsOptions.

Ogik99 commented 5 years ago

@dannyparsons any thoughts on this

rdstern commented 8 months ago

@Patowhiz am really keen that we try to be able to display warning messages in R-Instat? @dannyparsons says that you found this is done by Blue Sky and that therefore it should be feasible for us?

That would be great. It could be a popup, or in the output window? Apparently there was correspondence on this issue, but I haven't seen it. I hope it might also be a task that you could supervise, rather than having to do it?

In my discussions with Danny he didn't mention the pander package. I wonder if it may be relevant?

As an example of the need, I found a serious fault - I thought - in the geom_parallel_lines, and asked on the developers github site. When run in rstudio, itr had given a warning that the feature I was trying to use, was not recognised. Hence it had defaulted to a different analysis. I wish I had known.

Patowhiz commented 8 months ago

@rdstern thanks for raising this. I tried to quickly scan the R.Net documentation to check if I could find a quick solution but didn't find one. This doesn't mean that we can't, of course we can always write a work around, though that needs to be conceptualized as well. I'm happy to delegate that and check on the research feedback done.