Learn R Programming

JDCruncheR (version 0.3.5)

recode_indicator_num: Converting "values variables" into "modalities variables"

Description

To transform variables from the values matrix into categorical variables that can be added into the modalities matrix.

Usage

recode_indicator_num(
  x,
  variable_name,
  breaks = c(0, 0.01, 0.05, 0.1, 1),
  labels = c("Good", "Uncertain", "Bad", "Severe"),
  ...
)

Value

The function recode_indicator_num() 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.

Arguments

x

a QR_matrix or mQR_matrix object.

variable_name

a vector of strings containing the names of the variables to convert.

breaks

see function cut.

labels

see function cut.

...

other parameters of the cut function.

See Also

Traduction française

Other var QR_matrix manipulation: QR_var_manipulation, add_indicator()