Learn R Programming

cellGeometry (version 0.5.7)

rank_angle: Rank distance angles from a cosine similarity matrix

Description

Converts a cosine similarity matrix to angular distance. Then orders the elements in increasing angle. Elements below angle_cutoff are returned in a dataframe.

Usage

rank_angle(x, angle_cutoff = 45)

Value

a dataframe of rows and columns as factors and the angle between that row and column extracted from the cosine similarity matrix. Row and column location are stored as factors so that they can be converted back to coordinates in the similarity matrix easily using as.integer().

Arguments

x

a cosine similarity matrix generated by cos_similarity().

angle_cutoff

Cutoff angle in degrees below which to subset the dataframe.