ggvegan icon indicating copy to clipboard operation
ggvegan copied to clipboard

Autoplot permustats

Open jarioksa opened this issue 1 year ago • 2 comments

This PR provides autoplot and fortify methods for vegan::permustats results. These will eventually replace lattice methods densityplot and qqmath, and provide an alternative ggplot2 graphics for boxplot.

jarioksa avatar Jul 08 '23 12:07 jarioksa

Gav,

Feel free to make those fixes. I'll try follow the lead for the next pull requests.

There is one thing that I do not understand: why do you think that using Title case is bad for variables? After all, plot labels usually are title case, and it is natural to have them title case also in fortified scores. Even if you have some fancy package that does magic on names, doing it explicitly and plainly is much sounder imho. These fortified scores are not real data files, but messy interim result mixing data and formatting passed to plotting functions, and users may want to use them for their extra purposes – and may not have magic.

PS. vegan::scores methods have now argument tidy = TRUE which return a data.frame for tidy. I think most of these use title case for variables. In ordiggplot I still used ggvegan::fortify, but vegan::scores might be better as it can return all scores with arg display="all" (incl. regression scores). However, it is sure I won't import tibbles to vegan but they will always be data frames.

jarioksa avatar Jul 12 '23 17:07 jarioksa

There is one thing that I do not understand: why do you think that using Title case is bad for variables? After all, plot labels usually are title case, and it is natural to have them title case also in fortified scores.

This is mainly a stylistic thing, but I also find using lowercase column names easier to code with - I don't have to remember how I capitalised things if I simply don't do it

gavinsimpson avatar Aug 01 '23 12:08 gavinsimpson