Skip to content
Prev 131351 / 398502 Next

newbie lapply question

I am not sure to understand your problem, but it seems to me that you 
can use directly the function on the range of the dates:

 > x=as.Date(c('2007-01-01','2007-01-02'))
 > fff=function(x){y=x+1;return(y)}
 > fff(x)
[1] "2007-01-02" "2007-01-03"
 > class(fff(x))
[1] "Date"

Perhaps your function use a different input (not a vector of dates but a 
dataframe)?

domenico vistocco
Ranjan Bagchi wrote: