Hello!
I am trying to import my GPA and EFA data from momocs into geomorph for use in a phylogenetic PCA. Momocs does not have this function but I have used it for the EFA analysis however I now need to add a phylogenetically corrected PCA to my work so need to find a way of doing this on my Momocs data.
When trying to read the momocs data for gm.prcomp with or without the tree I get this:
> pca <- gm.prcomp(align_ldk.gpa$coo)
Error in base::colMeans(x, na.rm = na.rm, dims = dims, ...) :
'x' must be numeric
> gm.prcomp(align_ldk.gpa$coo, phy = FEP.tree, GLS = TRUE)
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'as.matrix': subscript out of bounds.
I have tried exporting the GPA coordinates as a csv file and then importing into geomorph and carrying out pca. This does produce a plot, however it has analysed it incorrectly and PC1 accounts for 99% of the variance, and I cannot figure out why it doesn't plot correctly.
Has anyone attempted something similar or know way to get these packages working together?
Many thanks,
Laura