Learn R Programming

LLMing (version 1.1.0)

sim_SNN: Compute shared nearest neighbors

Description

Builds a shared nearest neighbors matrix and, for each row (observation), returns the indices of the top neighbors with the largest SNN overlap counts

Usage

sim_SNN(z_dat, k, tops)

Value

A dataframe of top rows with shared nearest neighbors

Arguments

z_dat

A dataframe with numeric columns

k

An integer representing number of nearest neighbors

tops

An integer representing how many of shared nearest neighbors to return