The TimeIndex class in the 'fame' package handles this kind of stuff with ease. > library(fame) > ym <- 200212 > z <- lastDayOf(ti(100*ym + 1, tif = "monthly")) > z [1] 20021231 class: ti > tifName(z) [1] "daily"
a 'ti' object is a TimeIndex, and it has a tif (TimeIndexFrequency) embedded in it. -- Jeff ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
