"array chip":
>Hi, I had a weird results from using apply().
Consider:
y<-data.frame(list(a=c(1,NA), b=c('2k','0')))
do.call(args=y,
Vectorize(v=c("a","b"),
function(a,b) if(is.na(z<
uot;2010-01-01"))$ISOWeek
[1] 53
so that 2010-01-01 is actually on the week 53 of the year 2009.
January 4th is always on week 1 of the same year
> isoWeekYear(as.Date("2010-01-04"))$ISOWeek
[1] 1
and every now and then there are 53 weeks in
which(a) # 3 4 5
Heikki Kaskelma
__
R-help@r-project.org 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.
3 matches
Mail list logo