validateConsistency: Validate consistency between chart parameters

Description Usage Arguments Value Consistency rules

Description

Checks if the chosen parameters follows the consistency rules. It uses a data.frame as the data source.

Usage

1
validateConsistency(data, timeVar, groupVar, targetVar)

Arguments

data

A data.frame. The data source.

timeVar

A character. The name of the column with the time variable.

groupVar

A character. The name of the column with the group variable.

targetVar

A character vector. The name(s) of the column(s) with the target variable(s) values.

Value

A character. The constant .VALID if variables are consistent and an error message, otherwise.

Consistency rules

  1. If targetVar has more than one element, groupVar must be NULL. Otherwise, groupVar must be a factor in R and enum in the database.

  2. If groupVar IS NOT NULL, each of its categories must have non null targetVar values corresponding to each different timeVar value. Besides, the set of different timeVar values must be the same for each category in groupVar.

  3. If groupVar IS NULL, each targetVar column must contain non null values corresponding to each different timeVar value. Besides, the set of different timeVar values must be the same for each targetValue.


talithafs/dzVis-Package documentation built on May 31, 2019, 2:54 a.m.