Title: | Run Quality Checks on Data Prior to Submission to ICES |
---|---|
Description: | Run quality checks on data sets using the same checks that are conducted on the ICES Data Submission Utility (DATSU) <https://datsu.ices.dk/web/index.aspx>. |
Authors: | Colin Millar [aut, cre] |
Maintainer: | Colin Millar <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.1.0 |
Built: | 2024-09-12 05:00:03 UTC |
Source: | https://github.com/ices-tools-prod/icesDatsuQC |
Check a data set against the ICES DATSU data submission utility, the user must supply a dataset version and record type.
runQCChecks(filename, datasetverID, recordType)
runQCChecks(filename, datasetverID, recordType)
filename |
the filename of the file to check |
datasetverID |
the dataset ID |
recordType |
string name of the record type |
The list of check failures
filename <- system.file("test_files/vms_test.csv", package = "icesDatsuQC") runQCChecks(filename, 145, "VE")
filename <- system.file("test_files/vms_test.csv", package = "icesDatsuQC") runQCChecks(filename, 145, "VE")
Check vocabularies in a data set against the ICES DATSU data submission utility, the user must supply a dataset version and record type.
runVocabChecks(filename, datasetverID, recordType)
runVocabChecks(filename, datasetverID, recordType)
filename |
the filename of the file to check |
datasetverID |
the dataset ID |
recordType |
string name of the record type |
The list of vocabulary errors. Every line that failed is reported for each field.
filename <- system.file("test_files/vms_test.csv", package = "icesDatsuQC") vc <- runVocabChecks(filename, 145, "VE") if (length(vc) > 0) { library(icesDatsu) data <- read.csv( filename, header = FALSE, col.names = getDataFieldsDescription(145, "VE")$fieldcode ) # some invalid entries data[vc[[1]], names(vc)[1]] }
filename <- system.file("test_files/vms_test.csv", package = "icesDatsuQC") vc <- runVocabChecks(filename, 145, "VE") if (length(vc) > 0) { library(icesDatsu) data <- read.csv( filename, header = FALSE, col.names = getDataFieldsDescription(145, "VE")$fieldcode ) # some invalid entries data[vc[[1]], names(vc)[1]] }