dp_to_time {datapackage} | R Documentation |
Convert a vector to 'time' using the specified field descriptor
Description
Convert a vector to 'time' using the specified field descriptor
Usage
dp_to_time(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::iso8601totime' 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:00Z).
Value
Will return an Time
vector (see iso8601totime
with fielddescriptor
added as the 'fielddescriptor' attribute.
[Package datapackage version 0.2.3 Index]