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 |
indicator |
a |
variable_name |
a string containing the name of the variables to add. |
... |
other parameters of the function |
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:
a
vector
's elements must be named and these names must match those of the quality report (variable "series");a
data.frame
must contain a "series" column that matches with the quality report's series.
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
Other var QR_matrix manipulation:
QR_var_manipulation
,
recode_indicator_num()