To export a quality report in an Excel file.
Usage
# S3 method for class 'QR_matrix'
write(x, file, auto_format = TRUE, overwrite = TRUE, ...)Arguments
- x
a
QR_matrixobject.- file
a
characterobject with the path to the file to export- auto_format
logical indicating whether to format the output (
auto_format = TRUEby default).- overwrite
logical indicating whether to create an Excel file if it doesn't exist yet (
overwrite = TRUEby default)- ...
other unused arguments
Value
Returns invisibly (via invisible()) a workbook object
created by openxlsx::loadWorkbook() for further manipulation.
See also
Other QR_matrix functions:
QR_matrix(),
extract_QR(),
print.QR_matrix(),
rbind.QR_matrix(),
sort,
weighted_score(),
write.mQR_matrix()
Examples
# Path leading to a demetra_m matrix
demetra_path <- file.path(
system.file("extdata", package = "JDCruncheR"),
"WS/WS_world/Output/SAProcessing-1",
"demetra_m.csv"
)
# Extract the quality report from the demetra_m file
QR <- extract_QR(demetra_path)
#> Multiple column found for extraction of diagnostics.seas-i-qs:2, diagnostics.seas-i-qs
#> Last column selected
#> Multiple column found for extraction of diagnostics.seas-i-f:2, diagnostics.seas-i-f
#> Last column selected
# Export the Quality Report to an Excel file
write(x = QR, file = tempfile(fileext = ".xlsx"))