ekstroem / dataReporter

85 stars 4 forks source link

Feature enhancement - two ways plots and plots by group #8

Open Ales-G opened 1 year ago

Ales-G commented 1 year ago

Hello, first of all thanks for creating this wonderful and helpful package. I use it all of the time.

Maybe this is something already feasible, but I did not find an easy solution. I was wondering whether I can use dataReporter to create descriptive statistics by group. For instance to have all of my variables plotted with facet facet_wrap(~group)

A baseline example would be doing something like, but with dataReporter and over all of the variables

iris <- iris
ggplot(iris,aes(x=Petal.Length))+
  geom_histogram()+
  facet_wrap(~Species)

Would this be possible? also, is there an easy way to create a dataReporter to create two-way scatter plots over a single variable of interest?

thanks a lot

annennenne commented 1 year ago

This is not something that dataReporter supports at the moment. I don't think this need for a "stratified" data report is that common, but if more users request it (or someone implements it themselves and provides a pull request), we'll consider adding it to the package.

In the meantime, note that you can incorporate your data report into an existing Rmarkdown document -- maybe this will allow you to add the extra plots that you are interested in. Try having a look at section 5.3 in our JSS article (https://www.jstatsoft.org/article/view/v090i06) - it describes a few strategies for this.