Re: [R] unfold list (variable number of columns) into a data frame

2011-10-23 Thread Giovanni Azua
Hi Dennis, Thank you very nice :) Best regards, Giovanni On Oct 23, 2011, at 6:55 PM, Dennis Murphy wrote: > Hi: > > Here's one approach: > > # Function to process a list component into a data frame > ff <- function(x) { > data.frame(time = x[1], partitioning_mode = x[2], workload = x[3],

Re: [R] unfold list (variable number of columns) into a data frame

2011-10-23 Thread Dennis Murphy
Hi: Here's one approach: # Function to process a list component into a data frame ff <- function(x) { data.frame(time = x[1], partitioning_mode = x[2], workload = x[3], runtime = as.numeric(x[4:length(x)]) ) } # Apply it to each element of the list: do.call(rbind, lapply(