rr_apply_datatype.RdRegisters use their own datatypes. This function converts character vectors to the equivalent R datatypes, handling cardinality='n'.
rr_apply_datatype(x, datatype, cardinality = 1, apply_iso_8601 = TRUE)
| x | Character vector (a field of a register). |
|---|---|
| datatype | Name of the datatype to apply: currently one of |
| cardinality | Character, one of |
| apply_iso_8601 | Logical, whether to parse ISO8601 strings as datetimes
with |
rr_apply_datatype("2014-04", "datetime")#> [1] "2014-04-01 01:00:00 BST"