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

rescale

Rescaling row/column categories coordinates between a minimum and maximum value


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

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

data(greenacre_data)

#rescale the row coordinates between 0 and 10
res <- rescale(greenacre_data, which="rows", min.v=0, max.v=10)

CAinterprTools

Graphical Aid in Correspondence Analysis Interpretation and Significance Testings

v1.1.0
GPL
Authors
Gianmarco Alberti [aut, cre]
Initial release

We don't support your browser anymore

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