[Vegan-commits] vegan dependences

Jari Oksanen jari.oksanen at oulu.fi
Tue Jan 5 11:24:49 CET 2010


Howdy Folks,

Gav just put a first version of his permute package in the vegan/pkg
hierarchy. The purpose is to make vegan DEPEND on 'permute' which
provides the infrastructure for all permutation routines. This is a
separate package so that other packages needing permutations could
easily access 'permute' without needing to load the whole of vegan and
its dependences. 

Vegan is indeed huge, and it SUGGESTs many packages. The general policy
is to avoid too many dependences, and, in particular, to avoid
unnecessary chained dependences: packages BAR that is loaded because we
depend on package FOO, although we never need the component of FOO that
needs BAR. Here a list of explicit dependences in vegan. 

The format is function (method function if not the main): package. The
files are grouped by the package they depend on

rankindex: cluster::daisy

MOStest (plot): ellipse 

oecosimu (densityplot): lattice
ordicloud: lattice
ordiresids: lattice
ordisplom: lattice
ordixyplot: lattice
poolaccum (plot): lattice
radfit (plot.radfit.frame, radlattice): lattice
renyiaccum (plot): lattice
renyi (plot): lattice

CCorA: MASS::ginv
fisherfit (confint): MASS::confint 
metaMDS (widely): MASS::isoMDS & co.
MOStest (confint): MASS::confint
spantree (plot): MASS::sammon 

ordisurf: mgcv

ordirgl: rgl
isomap (rgl.isomap): rgl
renyiaccum (rgl.renyiaccum): rgl

ordiplot3d: scatterplot3d

orditkplot: tcltk

Previously we have depended on 'akima' (ordisurf), but the code was
rewritten so that the dependence could be avoided. In that connection I
introduced C-code for the point-in-polygon problem which was needed to
dump 'akima' and avoid even worse scenarios of chained dependence on
'sp' package. 

I think the current scheme of dependences is mostly acceptable:
scatterplot3d, rgl, tcltk and mgcv cases are clearly specific interfaces
provided exactly for these packages. Packages 'cluster', 'lattice',
'MASS' and 'mgcv' are recommended and 'tcltk' is in 'base' (although
MacOS binaries break this in their typical Mac arrogance and have no
'tcltk'!). This leaves only 'ellipse' as a non-standard and
non-essential package. I tried to liberate vegan from 'ellipse' by
re-writing ordiellipse() function, but now 'ellipse' sneaks back with
MOStest. I have considered leaving MOStest out of the next release just
to avoid this dependence.

Currently vegan SUGGESTs these packages, because they are not essential
except for specific functions, and you may well use most of vegan
without ever needing the extra packages. Only the usage of 'lattice'
seems to be so wide-spread that we could consider DEPENDing on that. It
could be also possible to split a vegan3d package for 'rgl' and
'scatterplot3d' packages apart from vegan, but I am not sure if this
worthwhile. 

The 'rankindex' depends on the Gower distance in 'cluster', but only if
the user specifies factors. I have considered adding the same feature to
bioenv(), but then I must change the scaling of gradients within
bioenv() to "range" like in Gower distance for internal consistency with
alternating continuous-only and mixed data subsets. I don't think it
makes sense to add Gower distance for mixed data in 'vegan', because
there is already 'cluster' which is a recommended package.

Actually, we should perhaps provide ENHANCES fields for 'coda' package
because we provide an interface for that in as.mcmc.oecosimu(), although
there is no explicit dependence.

Cheers, Jari Oksanen


More information about the Vegan-commits mailing list