Andrés,

To get statistics other than the mean (SD ~ error as you wrote) you can
stack the dist object (e.g. stack.dist in mefa pkg with dim.names = TRUE)
and then calculate statistics for subsets based on your grouping variable.

Cheers,

Peter

--
Péter Sólymos, Dept Biol Sci, Univ Alberta, T6G 2E9, Canada AB
solymos@ualberta.ca, Ph 780.492.8534, http://psolymos.github.com
Alberta Biodiversity Monitoring Institute, http://www.abmi.ca
Boreal Avian Modelling Project, http://www.borealbirds.ca


On Mon, Dec 16, 2013 at 12:23 PM, Jari Oksanen <jari.oksanen@oulu.fi> wrote:

> Function meandist() should do this. Its name is kind of hint.
>
> Cheers, Jari Oksanen
> On 16/12/2013, at 21:16 PM, Andres Mellado Diaz wrote:
>
> > Dear list memnbers,
> >
> > I would greatly appreciate any suggestion on how to get averaged
> distance values (and errors) between groups of samples using vegan
> (vegdist, dist,...).
> >
> > As an example, I have a faunal table (samples by taxa, "mMCINVmmh") and
> some grouping factors (for example: "gradreg_mmh") that I want to test,
> like this:
> >
> >
> >> vegdist(mMCINVmmh, method="bray", binary=FALSE, diag=F,
> upper=F)->vegdist1
> >
> >> vegdist1
> >
> >          TR_1_2    TR_1_3    TR_2_2    TR_2_3    TR_3_1    TR_3_2
> > TR_1_3 0.7361704
> > TR_2_2 0.1509007 0.7785157
> > TR_2_3 0.6465259 0.4095644 0.6832353
> > TR_3_1 0.8717468 0.9572968 0.8551546 0.9373980
> > TR_3_2 0.6925163 0.7197110 0.7428020 0.4742819 0.7800620
> > TR_3_3 0.8166542 0.7199418 0.8365397 0.6215122 0.8582932 0.5364242
> >
> >> gradreg_mmh
> >
> > [1] 0 0 3 3 5 5 5
> >
> > Levels: 0 3 5
> >
> >>
> >
> > So I want to get the pairwise mean distances and errors between groups
> 0, 3 and 5...
> >
> >
> > many thanks in advance,
> >
> > Andrés
> >
> > --
> > Andrés Mellado Díaz
> >
> > Centre for Hydrological Studies CEH-CEDEX
> > Water Quality Department
> > Pº bajo de la Virgen del Puerto, 3
> > 28005, Madrid
> > SPAIN
> >
> >
> > --
> > Andrés Mellado Díaz
> >
> > Centre for Hydrological Studies CEH-CEDEX
> > Water Quality Department
> > Pº bajo de la Virgen del Puerto, 3
> > 28005, Madrid
> > SPAIN
> >
> > _______________________________________________
> > R-sig-ecology mailing list
> > R-sig-ecology@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>

	[[alternative HTML version deleted]]

