add_indicator {JDCruncheR}R Documentation

Adding an indicator in QR_matrix objects

Description

Function to add indicators in QR_matrix objects.

Usage

add_indicator(x, indicator, variable_name, ...)

Arguments

x

a QR_matrix or mQR_matrix object

indicator

a vector or a data.frame (cf. details).

variable_name

a string containing the name of the variables to add.

...

other parameters of the function merge.

Details

The function add_indicator() adds the chosen indicator to the values matrix of a quality report. Therefore, because said indicator isn't added in the modalities matrix, it cannot be used to calculate a score (except for weighting). Before using the added variable for score calculation, it will have to be coded with the function recode_indicator_num.

The new indicator can be a vector or a data.frame. In both cases, its format must allow for pairing:

Value

This function returns the same object, enhanced with the chosen indicator. So if the input x is a QR_matrix, an object of class QR_matrix is returned. If the input x is a mQR_matrix, an object of class mQR_matrix is returned.

See Also

Traduction française

Other var QR_matrix manipulation: QR_var_manipulation, recode_indicator_num()


[Package JDCruncheR version 0.2.4 Index]