cos_sim: Cosine similarity.

cos_simR Documentation

Cosine similarity.

Description

Cosine similarity.

Usage

cos_sim(M)

Arguments

M

An input Matrix.

Vectors are in rows: mtcars[1, ].

Examples

sim <- cos_sim(as.matrix(mtcars[1:3, ]))

# distances (against normalized vectors)
as.dist(1 - sim)

qzhang503/proteoQ documentation built on Dec. 14, 2024, 12:27 p.m.