vcos {EnvNJ} | R Documentation |
Computes pairwise cosines of the angles between vectors.
vcos(vectors, silent = TRUE, digits = 3)
vectors |
a named list (or dataframe) containing n-dimensional vectors. |
silent |
logical, set to FALSE to avoid loneliness. |
digits |
integer indicating the number of decimal places. |
Cosines are standard measure of vector similarity. If the angle between two vectors in n-dimensional space is small, then the individual elements of their vectors must be very similar to each other in value, and the calculated cosine derived from these values is near one. If the vectors point in opposite directions, then the individual elements of their vectors must be very dissimilar in value, an the calculated cosine is near minus one.
A triangular matrix with the cosines of the angles formed between the given vectors.
vdis()
vcos(otu.space(bovids[, 1:4]))