[R] Newbie woes with *apply

Dimitri Shvorob dimitri.shvorob at gmail.com
Sun Feb 14 15:24:39 CET 2010


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.



More information about the R-help mailing list