Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- days <- c("01.01.2000", "02.01.2000", "05.01.2000", "06.01.2000", "07.01.2000", "08.01.2000", "09.01.2000", "12.01.2000", "13.01.2000", "14.01.2000", "15.01.2000")
- # days 1 2 3 4 5
- # 01.01.2000
- # 02.01.2000
- # 05.01.2000
- # 06.01.2000
- # 07.01.2000
- # 08.01.2000 01.01.2000 02.01.2000 05.01.2000 06.01.2000 07.01.2000
- # 09.01.2000 02.01.2000 05.01.2000 06.01.2000 07.01.2000 08.01.2000
- # 12.01.2000 05.01.2000 06.01.2000 07.01.2000 08.01.2000 09.01.2000
- # 13.01.2000 06.01.2000 07.01.2000 08.01.2000 09.01.2000 12.01.2000
- # 14.01.2000 07.01.2000 08.01.2000 09.01.2000 12.01.2000 13.01.2000
- # 15.01.2000 08.01.2000 09.01.2000 12.01.2000 13.01.2000 14.01.2000
- library(zoo)
- z <- lag(zoo(days), -c(0, 5:1))
- coredata(z)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement