View source: R/lubridate_supplements.R
parse_unix_time | R Documentation |
Function to conveniently parse a vector of Unix time to a POSIXct date vector.
parse_unix_time(x, tz = "UTC", origin = "1970-01-01")
x |
An integer- or numeric-vector of Unix times. |
tz |
Time-zone string. |
origin |
Origin of epoch. By definition, Unix time is |
A POSIXct vector with the length of x
.
Stuart K. Grange
# A vector
unix_time_vector <- c(1460034000, 1460034703)
# Parse time, will be in UTC time-zone
parse_unix_time(unix_time_vector)
# Or in Berlin's time-zone
parse_unix_time(unix_time_vector, tz = "Europe/Berlin")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.