Re: [R] weird apply() behavior

2011-08-29 Thread Heikki Kaskelma
"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<

Re: [R] Convert week value to date

2011-08-19 Thread Heikki Kaskelma
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

Re: [R] while loop syntax help

2008-03-03 Thread Heikki Kaskelma
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.