validateRDBESDataObject: Check Whether an 'RDBESDataObject' is in a Valid Format

View source: R/validateRDBESDataObject.R

validateRDBESDataObjectR Documentation

Check Whether an RDBESDataObject is in a Valid Format

Description

Perform basic checks on a object.

Usage

validateRDBESDataObject(
  objectToCheck,
  checkDataTypes = FALSE,
  verbose = FALSE,
  strict = TRUE
)

checkRDBESDataObject(
  objectToCheck,
  checkDataTypes = FALSE,
  verbose = FALSE,
  strict = TRUE
)

Arguments

objectToCheck

RDBESDataObject i.e. a list of data.tables

checkDataTypes

(Optional) Set to TRUE if you want to check that the data types of the required columns are correct, or FALSE if you don't care. Default value is FALSE.

verbose

(Optional) Set to TRUE if you want informative text printed out, or FALSE if you don't. The default is FALSE.

strict

(Optional) Set to TRUE if you want to be sure all columns are present in the data, set to FALSE if you only want to check that essential columns are present. The default is TRUE.

Details

Checks if 'objectToCheck' parameter is valid. Returns the parameter if it is valid and otherwise stops on error. It checks the RDBESDataObject if:

  • Is this an object of class RDBESDataObject

  • Tables don't have column names that aren't allowed

  • Tables have all the required column names

It does not check if the data is valid. The RDBES upload system performs an extensive set of checks on the uploaded data.

Value

Returns objectToCheck

Examples

## Not run: 
myH1RawObject <-
importRDBESDataCSV(rdbesExtractPath = "tests/testthat/h1_v_1_19")
validateRDBESDataObject(myH1RawObject)
## End(Not run)


ices-tools-dev/icesRDBES documentation built on April 17, 2025, 1:58 p.m.