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.
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
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