groupBycoord: Define groups of categories on the basis of a selected...

Description Usage Arguments Details Examples

Description

The function allows to group the row/column categories into k user-defined partitions.

Usage

1
groupBycoord(data, x = 1, k = 3, which = "rows", cex.labls = 0.75)

Arguments

data:

name of the dataset (must be in dataframe format).

x:

dimension whose coordinates are used to build the partitions.

which:

speficy if rows ("rows"; default) or columns ("cols") must be grouped.

cex.labls:

set the size of the labels of the dotchart (0.75 by default).

Details

K groups are created employing the Jenks' natural break method applied on the selected dimension's coordinates. A dotchart is returned representing the categories grouped into the selected partitions. At the bottom of the chart, the Goodness of Fit statistic is also reported. The function also returns a dataframe storing the categories' coordinates on the selected dimension and the group each category belongs to.

Examples

1
2
3
data(greenacre_data)
res <- groupBycoord(greenacre_data, x=1, k=3, which="rows") # divide the row categories into 3 groups on the basis of the coordinates of the 1st dimension, and store the result into a 'res' object
 

gianmarcoalberti/CAinterprTools documentation built on May 17, 2019, 4:18 a.m.