mark-andrews / psyntur

Tools to help teach data analysis using R to NTU Psychology students
Other
5 stars 2 forks source link

Add ggpairs wrapper #11

Closed mark-andrews closed 3 years ago

mark-andrews commented 3 years ago

Make wrapper for ggpairs to make a scatterplot matrix with histograms or density plots on diagonal.

jensroes commented 3 years ago

Check the pairs plot in this app: https://jens-roeser.shinyapps.io/multilangapp/ Is that similar to what you have in mind? Not sure how difficult it is add density plots. I did that one in ggplot because I find ggpairs confusing :)

mark-andrews commented 3 years ago

I merged in your #21 into the development branch, but there is a problem with the columns call in ggpairs. It is probably easy to fix, but the preferable thing would be use nse for the variables, e.g.

pairs_plot(variables = c(sex_dimorph, attractive), data = faithfulfaces)

But I find nse is bloody difficult and so I couldn't quickly figure immediately so I didn't do it immediately. But I think I know now. The nice thing is that it would also allow us to do eg.

pairs_plot(variables = starts_with('foo'), data = faithfulfaces)

and other tidy selection methods :)

mark-andrews commented 3 years ago

This was dealt with some time ago, but I did not close the issue and I forget which commit dealt with it too....sorry