[R] 'Boolean Index too long'
Sarah Goslee
sarah.goslee at gmail.com
Tue Jun 11 22:17:33 CEST 2013
Hi,
On Tue, Jun 11, 2013 at 11:41 AM, Wobbe Gong <wobbegong85 at gmail.com> wrote:
> #Hi, I am trying to run an MRPP with community data (spp-site-matrix). I
> use the following code:
>
> mzbtaxa_mrpp <- mrpp(mzbdist,mzbsites$Site)
Are you using mrpp() from the vegan package? It's good practice to say.
> #mzbdist being a distance object (Bray-Curtis similarity matrix) derived
> from my sqrt transformed community data set, created with function
> 'vegdist', mzbsites$Site refers to factors structuring my community.
>
> #when I run this code, I get the following error message:
>
> error in dmat[ind == x, ind == x] : (subscript) boolean index too long
>
> #What does that mean? How can I solve this problem?
You don't provide a reproducible example, but my first guess is that
your grouping variable is not the same size as your dataset.
You don't tell us how you calculated mzbdist but assuming it's an
object of class dist, is
attributes(mzbdist)$Size
the same as
length(mzbsites$Site)
If not, you have a problem with your data preparation.
Sarah
--
Sarah Goslee
http://www.functionaldiversity.org
More information about the R-help
mailing list