Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

xtable

Partition crosstable with empty clusters


Description

This produces a crosstable between two integer vectors (partitions) of the same length with a given maximum vector entry k so that the size of the table is k*k with zeroes for missing entries between 1 and k (the command table does pretty much the same thing but will leave out missing entries).

Usage

xtable(c1,c2,k)

Arguments

c1

vector of integers.

c2

vector of integers of same length as c1.

k

integer. Must be larger or equal to maximum entry in c1 and c2.

Value

A matrix of dimensions c(k,k). Entry [i,j] gives the number of places in which c1==i & c2==j.

Author(s)

See Also

Examples

c1 <- 1:3
  c2 <- c(1,1,2)
  xtable(c1,c2,3)

fpc

Flexible Procedures for Clustering

v2.2-9
GPL
Authors
Christian Hennig <christian.hennig@unibo.it>
Initial release
2020-12-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.