geomorphR/geomorph

gm.prcomp issue?

Closed this issue · 5 comments

Please, how to visualize Phylomorphospace in ver. 4.0 Geomorph?
I tried
plot(gm.prcomp(Y.gpa$coords, phy=mytree, align.to.phy = TRUE))
and got this:
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'as.matrix': subscript out of bounds

"plot(gm.prcomp(Y.gpa$coords)" works well while standing alone without the tree data.
Thanks!

Have you installed the latest version of RRPP? If this is not the issue, I´m afraid this is difficult to diagnose without the data, if you want to send me a bin with your Y.gpa object I can have a look.

Please, is it possible to get any full script for 4.0 Geomorph version so I could fully follow it (I mean from uploading to plotting)? I tried to use manual but there are some gaps in explanation or what type of data is used. For example "phy" data is included already in it. I have one script from friend and his analysis, but it is for 3.0 version and some things just does not work anymore (f.e. phylomorphospace, which is now integrated into gm.prcomp but it doesn't want to work and few other issues. Thanks a lot!

Thanks. But for example in "Y.gpa <- gpagen(plethspecies$land)", the file "plethspecies" contains already both landmark and phy data. So later if phy data is needed there is only "plethspecies$phy" used. I have my data separated and I don't know how to merge it in this way. When I try to use only my "phy" (meaning tree data, lets say "mytree"), it does not work. It is pruned and in older version it worked.
PCA.w.phylo <- gm.prcomp(Y.gpa$coords, phy = plethspecies$phy) #your testing data
vs.
PCA.w.phylo <- gm.prcomp(Y.gpa$coords, phy = mytree) # my data
Thank you.