subscript out of bounds

112 views
Skip to first unread message

Vicente Muñoz Walther

unread,
Feb 4, 2022, 9:52:12 AM2/4/22
to geomorph-...@googlegroups.com
Hello all! I am trying to do a character state reconstruction using gm.prcomp from geomorph in Rstudio. I can successfully do it with the example data (plethspecies), but I haven't been able to do it with my own data. I get the following error message.

Error in Y[phy$tip.label, ] : subscript out of bounds

I thought maybe this was caused by a different number of taxa in the phylogeny and the data matrix, but I have checked and re-cheked and it is not the case. I am quite new to geomorph and R programming, so any help would be appreciated.
Thanks in advance.

--
Vicente Muñoz Walther
Ph.D.(c)
Laboratorio de Ontogenia y Filogenia
Las Palmeras 3425
Universidad de Chile

Antigoni Kaliontzopoulou

unread,
Feb 4, 2022, 9:56:58 AM2/4/22
to geomorph-...@googlegroups.com
Vicente,

Check that the names fully coincide (those in your data matrix, with the tip labels of the tree, that is). Looks like that might be the issue. "Check" means by some automated R-driven method, e.g. all(dimnames(mydata)[[3]]%in%mytree$tip)), as there may be empty spaces etc you are not identifying by eye.

If you can't figure it out, send me your data, tree and script offline and I can have a look if you want.

Antigoni

--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/CA%2BVmrY68CnPwCntXfWUQwihaB%2BLW%3DJCZL8E1AWtUxRAR%3DHbXBA%40mail.gmail.com.


--
Reply all
Reply to author
Forward
0 new messages