[R] mantel test and NAs

Sarah Goslee sarah.goslee at gmail.com
Fri Dec 18 15:02:43 CET 2009


You will most likely need to drop the samples that are causing the NA
values from both of your datasets. The function won't work with NA values.

Sarah

On Thu, Dec 17, 2009 at 12:33 PM, marciarocha <marcia.rocha at gmail.com> wrote:
>
> Dear R users,
>
> I am having a problem performing the mantel test (both with functions mantel
> {vegan} and mantel.test {ape}) due to I believe the presence of NAs on my
> distance matrices, which look like e.g.:
>
> NA
> 1    2
> 1    2   3
> NA  4   5  6
>
> and
>
> 1
> 1   2
> 2   3   4
> 5   6   7  8
>
> Would any of you have a solution for that?
>
> Thank you for much for your help!
>
> Marcia Rocha
>
>

-- 
Sarah Goslee
http://www.functionaldiversity.org




More information about the R-help mailing list