Learn R Programming

Andromeda (version 0.6.7)

restorePosixct: Restore timestamps

Description

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

Usage

restorePosixct(x)

Value

A vector of type POSIXct.

Arguments

x

A numeric vector representing timestamps

See Also

restoreDate()

Examples

Run this code
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))
# # A tibble: 3 x 1
# startTime          
#              
# 1 2000-01-01 10:00:00
# 2 2001-01-31 11:00:00
# 3 2004-12-31 12:00:00

close(andr)

Run the code above in your browser using DataLab