dp_to_datetime {datapackage} | R Documentation |
Convert a vector to 'datetime' using the specified field descriptor
Description
Convert a vector to 'datetime' using the specified field descriptor
Usage
dp_to_datetime(x, fielddescriptor = list(), ...)
Arguments
x |
the vector to convert. |
fielddescriptor |
the field descriptor for the field. |
... |
passed on to other methods. |
Details
When fielddescriptor
is missing a default field descriptor is
generated.
For the default format 'iso8601::iso8601todatetime' is used to convert. This function allows more formats than the Data Package standard prescribes. When format equals "any" the default 'as.POSIXct' function is used.
When x
is numeric or integer, it is assumed that these are seconds
since the unix time epoch (1970-01-01T00:00:00).
Value
Will return an POSIXct
vector with fielddescriptor
added as the
'fielddescriptor' attribute.
[Package datapackage version 0.2.3 Index]