Provide validator for certain relevant fields of data that needs to be send to the API
Methods
Method valid_sex()
Validate sex column of a dataframe as positive integer
Arguments
df
dataframe where the values of the field are
field
field name
Method valid_bool_vector()
Validate all values of a column are indeed boolean and not equivalents
Arguments
df
dataframe where the values of the field are
field
field name
Method validate_datetime()
Validate all values of a column are either datetime in ymd_hms format or a date in ymd format.
Arguments
df
dataframe where the values of the field are
field
field name
is_datetime
boolean flag indicating whether to check datetime or date
Method check_na_fields()
Check whether there are NA values in some columns of a given dataframe
Arguments
df
dataframe
col_names
character vector with the columnnames
Method clone()
The objects of this class are cloneable with this method.
Arguments
deep
Whether to make a deep clone.