Skip to content
Prev 4428 / 15274 Next

How can I do this better (handling "realtime" macroeconomic data)?

Try this:

fetch2 <- function(d, as.of.date = Inf) {
	do.call(rbind, by(d, d$date, function(x)
		x[which.max(x[x$infodate <= as.of.date, ]$infodate), ]
))}
On Tue, Jun 30, 2009 at 11:19 PM, Ajay Shah<ajayshah at mayin.org> wrote: