RFC: Remove lattice graphics from vegan #727
jarioksa
announced in
Announcements
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Lattice graphics should be removed from vegan and replaced with ggplot2 graphics. However, vegan shall never be dependent on ggplot2 with its chained dependency network, but gg-graphics should be in a separate package. Gavin Simpson has worked on such a package ggvegan which is now going to CRAN, see gavinsimpson/ggvegan#38. With this we could advance with removing lattice and pointing to ggvegan (and some other packages).
Major drawback of lattice is that the canned graphics are difficult to modify for user needs. While ggplot2 is not too easy either, it is very versatile and can be modified by skilled users – and skills are widespread in the R community. Most lattice methods in vegan were added in 2008 to 2009 when ggplot2 was still at her infancy and much too volatile to be depended on.
Most lattice functions provide plotting methods for analytic vegan functions. For all these we have alternatives either in ggvegan or a complementary packages ggvegan2. These packages should be merged for the CRAN release when needed. The most important plotting methods in lattice are for RAD models (
radfit
etc.), permutation statistics (permustats
) and plots for diversity accumulation models (renyiaccum
,poolaccum
etc.).There are two more independent lattice tools in vegan: ordination graphics (
ordixyplot
,ordisplom
,ordicloud
) and plotting ordination residuals (ordiresids
):ordixyplot
much better alternatives already are available in ggvegan, other packages and are used in numerous scripts. Please note that currently all veganscores
functions should be able to return ordination scores in data frames that can be directly used in ggplot2 scripts. (But if you have your own scripts, please remember to set up equal aspect ratio with+coord_fixed()
).ordisplom
provides such a bad plot that it can just be dumped without replacement. If you need replacement, use your own scripts.ordicloud
for 3D lattice graphics could be moved to the vegan3d package. That package already hasordiplot3d
function with conventional graphics.ordiplot3d
is much more versatile and easier to modify, and the only advantage I know of is thatordicloud
can be "faceted" or plotted in a grid of graphics defined by external variables.ordiresids
is a bit special and largely superseded by vegan method functions forcca
(andrda
) such asfitted
,residuals
,rstandard
,rstudent
which can be used directly for plotting. Function is badly designed because it combines two distinct components in one function: code to extract scores, and code to plot scores. Currently I think that this functions either is completely removed or we keep only the first part of extracting scores. There is little advantage over directly extracting each scores, butordiresids
extracts simultaneously fit and residuals (with scaling and standardization alternatives) allowing a bit easier plotting. If we keep the function, we remove its independent help page (man/ordiresids.Rd
) and document it inman/influence.cca.Rd
.Beta Was this translation helpful? Give feedback.
All reactions