Re: [MORPHMET] pairwise matrix of vector angles in R

2017-11-03 Thread Mike Collyer
Dear David, and others, Be careful with the code you just introduced here. There are a couple of mistakes. First, vectors need to be unit length. You code does not transform the vectors to unit length. Second, it’s the arccosine, the cosine of the vector inner product that finds the angle.

Re: [MORPHMET] pairwise matrix of vector angles in R

2017-11-03 Thread Mike Collyer
Andrea, If you already have the matrix of coefficients, geomorph has an internal function that can do what you seek to do. You can try this geomorph:::vec.ang.matrix(myMatrix, type = “r”) # for vector correlations geomorph:::vec.ang.matrix(myMatrix, type = “rad”) # for vector angles in radians

[MORPHMET] pairwise matrix of vector angles in R

2017-11-03 Thread andrea cardini
Dear All, please, does anyone know if there's an R package that, using a matrix with several vectors (e.g., coefficients for allometric regressions in different taxa), will compute the pairwise (all possible pairs of taxa) matrix of vector angles? Thanks in advance for any suggestion. Cheers