Guest User

Untitled

a guest
Oct 13th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. library(data.table)
  2.  
  3. dat <- data.table(a = sample(1:10,5),
  4. b = sample(1:10,5),
  5. c = sample(1:10,5))
  6. apply(dat,2,function(k) { k * (60*60*24) } )-> tmpdata
  7. for (i in 1:3) {
  8. dat[,i := tmpdata[1 : NROW(tmpdata),i] %>% as.POSIXct(origin = "1899-12-30",tz = "UTC") , with = FALSE ]
  9. }
Advertisement
Add Comment
Please, Sign In to add comment