Hi Josh, It works perfectly! Thanks a lot for your quick and helpful answer! Karen -- View this message in context: http://r.789695.n4.nabble.com/I-need-help-for-creating-a-timevar-tp3643658p3645575.html Sent from the R help mailing list archive at Nabble.com.