Validate cell-DF
validate_cells(dat)
dat | An R object |
---|
Logical scalar. If the value is FALSE
, it will contain attribute named msg
.
It checks for following facts:
Whether dat
is a data.frame
Whether dat
conforms to rc_df
format
Whether dat
conforms to cell_df
format
If all the checks are passed then it returns TRUE
else it returns FALSE
with msg
attribute, indicating reason for validation failure.
#> [1] TRUE# this is FALSE chk <- validate_cells(tibble::tibble(row = 1, col = 2, data_type = "numeric")) # msg attr(chk, "msg")#> [1] "does not has required columns"