Learn R Programming

sams (version 0.4.3)

clusterWithItem: Identify Which Cluster Contains a Given Item

Description

Identify Which Cluster Contains a Given Item

Usage

clusterWithItem(i, partition)

Arguments

i

Item index as an integer vector of length one

partition

Set partition of the integers \(1\), ..., \(n\) represented as either a numeric vector of cluster labels, or a list containing subsets of these integers

Value

A list consisting of

which

An integer representing which cluster i belongs to

cluster

The subset of indices that correspond to the same cluster as i