Bug fix: first.day.of.quarter = function(date) { t = first.day.of.month(date) l = month(date) %% 3 if (l == 0) return(t) t = seq.Date(t, by = "-1 month", length = l) return(t[length(t)]) }
But the *apply part still does not work. -- View this message in context: http://n4.nabble.com/Newbie-woes-with-apply-tp1555149p1555167.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.