rescale: Rescaling row/column categories coordinates between a minimum...

Description Usage Arguments Details Examples

Description

This function allows to rescale the coordinates of a selected dimension to be constrained between a minimum and a maximum user-defined value.

Usage

1
rescale(data, x = 1, which = "rows", min.v = 0, max.v = 100)

Arguments

data:

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

x:

dimension for which the row categories contribution is returned (1st dimension by default).

which:

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

min.v:

minimum value of the new scale (0 by default).

max.v:

maximum value of the new scale (100 by default).

Details

The rationale of the function is that users may wish to use the coordinates on a given dimension to devise a scale, along the lines of what is accomplished in:
Greenacre M 2002, "The Use of Correspondence Analysis in the Exploration of Health Survey Data", Documentos de Trabajo 5, Fundacion BBVA, pp. 7-39
The function returns a chart representing the row/column categories against the rescaled coordinates from the selected dimension. A dataframe is also returned containing the original values (i.e., the coordinates) and the corresponding rescaled values.

Examples

1
2
data(greenacre_data)
res <- rescale(greenacre_data, which="rows", min.v=0, max.v=10)

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