extract_score: Score extraction

View source: R/QR_functions.R

extract_scoreR Documentation

Score extraction

Description

To extract score variables from QR_matrix or mQR_matrix objects.

Usage

extract_score(
  x,
  format_output = c("data.frame", "vector"),
  weighted_score = FALSE
)

Arguments

x

a QR_matrix or mQR_matrix.

format_output

string of characters indicating the output format: either a data.frame or a vector.

weighted_score

logical indicating whether to extract the weighted score (if previously calculated) or the unweighted one. By default, the unweighted score is extracted.

Details

For QR_matrix objects, the output is a vector or the object NULL if no score was previously calculated. For mQR_matrix objects, it is a list of scores (NULL elements or vectors).

See Also

Traduction française

Examples

## Not run: 
QR <- extract_QR()
mQR <- mQR_matrix(QR, compute_score(QR))
extract_score(QR) # NULL
extract_score(mQR) # List whose first element is NULL

## End(Not run)

AQLT/JDCruncheR documentation built on March 20, 2024, 2:32 p.m.