Restores datetimes that were converted by Andromeda to numeric values back to datetimes.

restorePosixct(x)

Arguments

x

A numeric vector representing timestamps

Value

A vector of type POSIXct.

See also

Examples

myData <- data.frame(startTime = as.POSIXct(c("2000-01-01 10:00", 
                                              "2001-01-31 11:00", 
                                              "2004-12-31 12:00")))
andr <- andromeda(myData = myData)

andr$myData %>% 
  collect() %>%
  mutate(startTime = restorePosixct(startTime))
#> Warning: There was 1 warning in `mutate()`.
#>  In argument: `startTime = restorePosixct(startTime)`.
#> Caused by warning:
#> ! Input to restorePosixct is already Posixct
#> # A tibble: 3 × 1
#>   startTime          
#>   <dttm>             
#> 1 2000-01-01 09:00:00
#> 2 2001-01-31 10:00:00
#> 3 2004-12-31 11:00:00
# # A tibble: 3 x 1
# startTime          
# <dttm>             
# 1 2000-01-01 10:00:00
# 2 2001-01-31 11:00:00
# 3 2004-12-31 12:00:00

close(andr)