Learn R Programming

sams (version 0.4.3)

sizeOfLargestCluster: Calculate the Number of Items in the Largest Cluster of a Set Partition

Description

Calculate the Number of Items in the Largest Cluster of a Set Partition

Usage

sizeOfLargestCluster(partition)

Arguments

partition

A numeric vector representing a partition of the integers \(1\), ..., \(n\) using cluster labels

Value

The number of items in the largest cluster of the given partition as a numeric vector of length one.

Examples

Run this code
# NOT RUN {
p <- c(0,1,1,1,1,1,2)
sizeOfLargestCluster(p)
# }

Run the code above in your browser using DataLab