check_numeric_range {RoMEBS} | R Documentation |
The function checks whether the values contained in specific fields are consistent with the allowed range of values.
check_numeric_range(DataTA, Field, Values, wd, suffix)
DataTA |
data table according to MEDITS protocol (TX) |
Field |
Name of the specific field of the selected TX table |
Values |
Vector of the allowed values for the field to be checked. The first two values are mandatory and indicate the extreme values of the range. The other optional values are single numerical exceptions to the field allowed values. |
wd |
working directory path defined by the user |
suffix |
Suffix string of the Logfile |
The function checks the consistence of the values contained in specific fields with the relative allowed range of values. The check is performed on any of the "TX" data tables.
The function returns TRUE if no error occurs, while FALSE is returned when there are empty values in data (NA). Furthermore, the function returns a warning message in case a field value is out of the expected range of values. In the logfile is reported the list of all the records in which the inconsistency is detected.
W. Zupa
Anonymus. 2017. MEDITS-Handbook. Version n. 9. MEDITS Working Group. 106 pp.https://www.sibm.it/MEDITS 2011/principaledownload.htm
wd <- tempdir() suffix="2020-03-05_time_h17m44s55" Field = "SHOOTING_DEPTH" Values = c(10,800,0) DataTA = MEDITS::TA library(RoMEBS) check_dictionary(ResultData = DataTA, Field, Values, wd, suffix)