[R] Fast nested List->data.frame

Dieter Menne dieter.menne at menne-biomed.de
Tue Jan 5 10:09:23 CET 2010


This is better by a factor of 4:

len = 100000
d = replicate(len, list(pH = 3,marker = TRUE,position = "A"),FALSE)
system.time(
{
    pHAll = data.frame(
      pH = unlist(lapply(d,"[[",1)),
      pH = unlist(lapply(d,"[[",2)),
      pH = unlist(lapply(d,"[[",3)))
}
)

Dieter

-- 
View this message in context: http://n4.nabble.com/Fast-nested-List-data-frame-tp998871p998902.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list