search for: patday

Displaying 1 result from an estimated 1 matches for "patday".

2004 Aug 06
3
Simple Lookup... why so slow
...and n=4000, this is not linear in time, so something I don't understand must go on. And, just as an aside: why is $-indexing so much faster (!) than numeric indexing? Dieter (all on Windows, latest R-Version) ---- # Generate Data set StartDay = matrix(as.integer(runif(80)*20),nrow=4) n=4000 PatDay = data.frame(Day = as.integer(runif(n)*20)+50, Pat= as.integer(runif(n)*20)+1, Treat = as.integer(runif(n)*4)+1, DayOff=NA) # reserve output space # Correct for days offset ti= system.time( for (i in 1:n) PatDay$DayOff[i] =...