extract_QR | R Documentation |
To extract a quality report from the csv file containing the diagnostics matrix.
extract_QR(
file,
x,
matrix_output_file,
sep = ";",
dec = ",",
thresholds = getOption("jdc_thresholds")
)
file |
the csv file containing the diagnostics matrix. This argument
supersedes the argument |
x |
data.frame containing the diagnostics matrix. |
matrix_output_file |
the csv file containing the diagnostics matrix. |
sep |
the separator used in the csv file (by default, |
dec |
the decimal separator used in the csv file (by default,
|
thresholds |
|
This function generates a quality report from a csv file containing
diagnostics (usually from the file demetra_m.csv).
The demetra_m.csv file can be generated by launching the cruncher
(functions cruncher
or
cruncher_and_param
) with the default export
parameters, having used the default option csv_layout = "vtable"
to
format the output tables of the functions
cruncher_and_param
and
create_param_file
when creating the parameters
file.
This function returns a QR_matrix
object, which is a list of 3
objects:
modalities
, a data.frame
containing several indicators and
their categorical quality (Good, Uncertain, Bad, Severe).
values
, a data.frame
containing the same indicators and the
values that lead to their quality category (i.e.: p-values, statistics,
etc.) as well as additional variables that don't have a modality/quality
(series frequency and arima model).
score_formula
that will store the formula used to calculate the
score (when relevant). Its initial value is NULL
.
If x
is supplied, the file
and matrix_output_file
arguments are ignored. The file
argument also designates the path to
the file containing the diagnostic matrix (which can be imported into R in
parallel and used with the x
argument).
a QR_matrix
object.
Traduction française
Other QR_matrix functions:
export_xlsx()
,
export_xlsx.QR_matrix()
,
export_xlsx.mQR_matrix()
,
rbind.QR_matrix()
,
sort()
,
weighted_score()
# Path of matrix demetra_m
demetra_path <- file.path(
system.file("extdata", package = "JDCruncheR"),
"WS/ws_ipi/Output/SAProcessing-1",
"demetra_m.csv"
)
# Extract the quality report from the demetra_m file
QR <- extract_QR(file = demetra_path)
print(QR)
# Extract the modalities matrix:
QR[["modalities"]]
# Or:
QR[["modalities"]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.