Description Usage Arguments Value Print Method Note See Also Examples
Show a summary report after importing and quality checking a directory of STAR templates.
1 | report(cluster, cluster.ok, qc.vector)
|
cluster |
a list of STAR objects, including ones that resulted in import
|
cluster.ok |
a list of STAR objects that have been selected and prepared for final import into the STAR database. |
qc.vector |
a logical vector, output from |
Nested list with top elements Count
and Filenames
.
When displaying a report
object, error messages from filenames that
failed to import are truncated to 23 characters by default. This makes the
report easy to read from the console. To show full error messages, pass a
large value of nchar
to the print
method:
1 2 |
The full set of Excel templates included in the report consists of all the
STAR objects in cluster
. They can be divided into three categories:
Imported. The STAR objects found in cluster.ok
.
Failed. Files that read.template
could not import.
Removed. Files that were manually removed by the administrator, because they were duplicate templates, empty templates, etc.
The report also includes a count of files that had errors detected by the
qc
suite of quality checks. The QC issues are independent of whether
read.template
was able to import or not. The purpose of the QC is to
raise a flag where stock assessors may have made a mistake when submitting
their STAR templates.
In addition to file counts, the report also includes the specific filenames that had errors, were removed, or had QC issues. This list is useful for STAR administrators to bring into focus any STAR templates that were not successfully imported.
write.report
writes a report object to a text file.
import.many.templates
imports many Excel STAR templates from a
directory into a cluster (list).
qc
runs all QC tests on an Excel STAR template or a directory
containing Excel STAR templates.
gfcmSTAR-package
gives an overview of the package.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
# Directory names
uploads <- "~/StockAssessmentResults/uploads/2021"
star.dir <- file.path(uploads, "WGSASP_General")
prop.file <- file.path(uploads, "properties/WGSASP_General.xlsx")
# Import
prop <- read.properties(prop.file)
cluster <- import.many.templates(star.dir, prop=prop)
# Select valid STAR objects to import into STAR database
cluster.ok <- cluster[sapply(cluster, class) != "try-error"]
cluster.ok$"star_template.xlsx" <- NULL
# Quality check
qc.vector <- qc(star.dir)
# Report
report(cluster, cluster.ok, qc.vector)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.