dot_test: Helping tests

dot_testR Documentation

Helping tests

Description

Tests for validating RCX objects and its aspects.

Usage

.test_RequiredColumnsPresent(aspect, columns, verbose = FALSE)

.test_ListRequiredColumnsPresent(aspect, columns, verbose = FALSE)

.test_AllowedColumnsPresent(aspect, columns, verbose = FALSE)

.test_ListAllowedColumnsPresent(aspect, columns, verbose = FALSE)

.test_NoMergeColumn(aspect, column, verbose = FALSE)

.test_AtLeastOneColumnPresent(aspect, columns, verbose = FALSE)

.test_AtLeastOneElementPresent(aspect, element, verbose = FALSE)

.test_OneNodePresent(nodesAspect, column, verbose = FALSE)

.test_IsUnique(aspect, column, verbose = FALSE)

.test_ListAllUnique(aspect, column, verbose = FALSE)

.test_IsUniqueInLists(aspect, column, verbose = FALSE)

.test_ListAllUniqueInLists(aspect, column, verbose = FALSE)

.test_IsLogical(aspect, column, verbose = FALSE)

.test_IsNumeric(aspect, column, verbose = FALSE)

.test_ElementIsNumeric(aspect, element, verbose = FALSE)

.test_IsCharacter(aspect, column, verbose = FALSE)

.test_ListAllCharacter(aspect, element, verbose = FALSE)

.test_IsList(aspect, column, verbose = FALSE)

.test_ElementIsList(aspect, element, verbose = FALSE)

.test_IsPos(aspect, column, verbose = FALSE)

.test_IsClass(x, cls, verbose = FALSE)

.test_IsNamedList(aspect, names, verbose = FALSE)

.test_IsCVPclass(x, cls, verbose = FALSE)

.test_ListOfCVPclass(x, cls, verbose = FALSE)

.test_ContainsNA(aspect, column, verbose = FALSE)

.test_ListAllContainsNA(aspect, element, verbose = FALSE)

.test_ListAllNumeric(aspect, column, verbose = FALSE)

.test_ListAllNumericOrInDict(aspect, column, dic, verbose = FALSE)

.test_ListAllOfClass(aspect, cls, verbose = FALSE)

.test_AspectExist(rcx, aspect, verbose = FALSE)

.test_IdsInAspect(ids, aspect, column, info = "", verbose = FALSE)

.test_ValuesInSet(aspect, column, set, ignoreNA = TRUE, verbose = FALSE)

.test_DataTypeColumn(aspect, column, verbose = FALSE)

Arguments

aspect

one RCX aspect

columns

character; list of columns

verbose

logical (default=FALSE); also log the results

column

character; column name

cls

character; class name in .CLS or .CLSvp

names

character; names of list

dic

character; key in .DICT

rcx

RCX object

ids

numeric; ids

info

character (default=""); additional message for verbose

ignoreNA

logical (default=TRUE); ignore NA values

Value

logical; pass or fail the test

Functions

  • .test_RequiredColumnsPresent: checks if aspect has all required columns

  • .test_ListRequiredColumnsPresent: checks if all list elements have all required columns

  • .test_AllowedColumnsPresent: checks if only allowed columns are set

  • .test_ListAllowedColumnsPresent: checks if all list elements have only allowed columns

  • .test_NoMergeColumn: checks if column with old ids is not present (would be a merge artefact)

  • .test_AtLeastOneColumnPresent: checks if at least one specified column is present

  • .test_AtLeastOneElementPresent: checks if at least one specified element is present

  • .test_OneNodePresent: checks if at least one element (node) is present in the specified column

  • .test_IsUnique: checks if all elements in specified column are unique

  • .test_ListAllUnique: checks for all list elements if all elements in specified column are unique

  • .test_IsUniqueInLists: checks if all elements in specified column are unique

  • .test_ListAllUniqueInLists: checks if all elements in specified column are unique

  • .test_IsLogical: checks if the specified column is of type logical

  • .test_IsNumeric: checks if the specified column is of type numeric

  • .test_ElementIsNumeric: checks if the specified column is of type numeric

  • .test_IsCharacter: checks if the specified column is of type character

  • .test_ListAllCharacter: checks if the specified list element are all of type character

  • .test_IsList: checks if the specified column is of type list

  • .test_ElementIsList: checks if the specified column is of type list

  • .test_IsPos: checks if the specified column are positive integers

  • .test_IsClass: checks if the specified column is of the specified class in .CLS

  • .test_IsNamedList: checks if the aspect is a list with specified names

  • .test_IsCVPclass: checks if the specified column is of the specified class in .CLSvp

  • .test_ListOfCVPclass: checks if the all elements in the list are of class in .CLSvp

  • .test_ContainsNA: checks if the specified column contains any NA values

  • .test_ListAllContainsNA: checks if the specified list element contains any NA values

  • .test_ListAllNumeric: checks if the specified column is a list with only numeric values (NAs and NULLs are not considered)

  • .test_ListAllNumericOrInDict: checks if the specified column is a list with only numeric values (NAs and NULLs are not considered) or in .DICT

  • .test_ListAllOfClass: checks if the specified column is a list with only numeric values (NAs and NULLs are not considered) or in .DICT

  • .test_AspectExist: checks if the rcx object contains the specified apsect

  • .test_IdsInAspect: checks if all provided ids are present in the specified column of an aspect

  • .test_ValuesInSet: checks if the specified column of an aspect only contains values of the provided set

  • .test_DataTypeColumn: checks if the dataType column of an aspect only contains JSON data types.

Note

Internal function only for convenience


frankkramer-lab/RCX documentation built on Feb. 4, 2023, 5:12 p.m.