Skip to content
Prev 227689 / 398500 Next

Cut a within elements by length, not value, of vectors

Building on Erik's solution and because it would easier to do date  
arithmetic..

d1 <- as.character(date)
d1 <- ifelse(nchar(d1)<4, paste(0,d1,sep=""),d1)
d2 <- as.Date(date, "%m%d")
On Jul 15, 2010, at 1:21 PM, btc1 wrote: