Version: | 1.2.0 |
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. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
RoxygenNote: | 7.3.2 |
Imports: | sqldf, icesDatsu (≥ 1.1.0), icesVocab, glue |
Encoding: | UTF-8 |
URL: | https://datsu.ices.dk, https://github.com/ices-tools-prod/icesDatsuQC |
BugReports: | https://github.com/ices-tools-prod/icesDatsuQC/issues |
Language: | en-GB |
NeedsCompilation: | no |
Packaged: | 2024-10-25 06:09:11 UTC; colin |
Author: | Colin Millar [aut, cre], Carlos Pinto [aut] |
Maintainer: | Colin Millar <colin.millar@ices.dk> |
Repository: | CRAN |
Date/Publication: | 2024-10-25 09:20:10 UTC |
Runs quality checks on a dataset
Description
Check a data set against the ICES DATSU data submission utility, the user must supply a dataset version and record type.
Usage
runQCChecks(filename, datasetverID, recordType)
Arguments
filename |
the filename of the file to check |
datasetverID |
the dataset ID |
recordType |
string name of the record type |
Value
The list of check failures
Examples
## Not run:
filename <- system.file("test_files/vms_test.csv", package = "icesDatsuQC")
runQCChecks(filename, 145, "VE")
## End(Not run)
Runs vocabulary checks on a dataset
Description
Check vocabularies in a data set against the ICES DATSU data submission utility, the user must supply a dataset version and record type.
Usage
runVocabChecks(filename, datasetverID, recordType)
Arguments
filename |
the filename of the file to check |
datasetverID |
the dataset ID |
recordType |
string name of the record type |
Value
The list of vocabulary errors. Every line that failed is reported for each field.
Examples
## Not run:
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]]
}
## End(Not run)