Learn R Programming

extracat (version 1.7-6)

combcl: Combine categorical variables from cfluctile and cflcl

Description

Combines variables obtained via cfcl and cfluctile to a single factor variable with one level per block-cluster and one level for the rest.

Usage

combcl(x)

Arguments

x

A matrix, table or data.frame. All variables should have the same number of categories.

Value

A factor variable with 1 level per diagonal element and 1 level for the rest.

Examples

Run this code
# NOT RUN {
a <- arsim(2000, c(12,17),5, noise=0.2,shuffle = FALSE)
cfa <- cfluctile(a)

da <- as.data.frame(a)
clusters <- cfcl( da, ll = cfa)

dev.new()
fluctile(xtabs(da$Freq~clusters[,1] + clusters[,2]))

table(combcl(clusters))

# }

Run the code above in your browser using DataLab