IDEMSInternational / R-Instat

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

Using broom and adding text to graphs #5037

Open rdstern opened 6 years ago

rdstern commented 6 years ago

Is your feature request related to a problem? Please describe. I have wanted to be able to add results to graphs for a long time, e.g. the correlation coefficient to our scatter-plots or the regression equation when using a line plot and adding the fitted line.

From stack-overflow this was a somewhat tricky problem in the past. Now there seems to be an excellent solution. And I suggest it fits very well with our ideas in R-Instat.

Describe the solution you'd likeinto graphs warrants The broom package is important for us in general I think, i.e. for the modelling menu. It is part of adding the tidy ideas also to modelling. There are essentially just 3 functions, namely augment, glimpse and tidy and they can be used on many, many models. They operate on all these model objects - could even be interesting for Prepare > R Objects > View!

The tidy results from broom are then used by ggpmisc which shows how far this type of solution can go. Examples are here.

We may also want to include ggpubr for the stat_cor and stat_regline_equation. They may be much simpler to include with the current ggplot system in R-Instat. And we may want different options for this? However, it is possible that adding text/labels/tables to graphs warrants a more detailed discussion on the possible structure. How can we make it simple!

Ogik99 commented 5 years ago

@maxwellfundi and @dannyparsons any thoughts on this

maxwellfundi commented 5 years ago

@Ogik99 I will have to look up on this issue. The idea is great to have text on the graphs we produce. Will revert as soon as I know a little more about it

maxwellfundi commented 5 years ago

I think we can easily add this feature to especially lineplots at the moment @Ogik99 for a start to have the values for the peaks and valleys.