Closed DanielEWeeks closed 1 year ago
Dan added ExampleR
that includes character value SUBJECT_ID
. Updated documentation. I added this as an example to integer_check
.
The error produced when we try integer_check(DD.dict.A, DS.data.P)
is because of a mismatch in specified TYPE
between the files called. In DD.dict.A
, SUBJECT_ID is listed as TYPE
integer. But in DS.data.P
, SUBJECT_ID is of TYPE
character. So the function is trying to apply int_check
to a non-numeric column because it is listed as being numeric.
To resolve this issue, I adjusted integer_check
to (1) perform int_check
only on numeric columns and (2) add names of variables that are listed as TYPE
numeric but read into R as type string to the Information returned to user.
All of the example data frames A through O contained only numeric columns, but P contains a character
SUBJECT_ID
, which leadsinteger_check
to fail. Presumably it would fail in the presence of one or more non-numeric columns becauseisTRUE(all(data == floor(data), na.rm = TRUE))
only works if all the entries in thedata
data frame are numeric.