Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. > dd <- as.Date(c("2013-01-01", "2013-02-01", "2013-03-01"))
  2. > class(dd)
  3. [1] "Date"
  4. > unlist(dd)
  5. [1] "2013-01-01" "2013-02-01" "2013-03-01"
  6. > list(dd)
  7. [[1]]
  8. [1] "2013-01-01" "2013-02-01" "2013-03-01"
  9.  
  10. > unlist(list(dd))
  11. [1] 15706 15737 15765
  12.  
  13. > dd <- list(dd, dd)
  14. > (d <- do.call("c", dd))
  15. [1] "2013-01-01" "2013-02-01" "2013-03-01" "2013-01-01" "2013-02-01" "2013-03-01"
  16. > class(d) # proof that class is still Date
  17. [1] "Date"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement