I have data frame that looks like the following
       models cores     time
1       4     1 0.000365
2       4     2 0.000259
3       4     3 0.000239
4       4     4 0.000220
5       8     1 0.000259
6       8     2 0.000249
7       8     3 0.000251
8       8     4 0.000258
... etc
I would like to convert it into a table/matrix with #models for rows labels, the #cores for the columns labels and time as the data entries
e.g.
  1 2 3 4 5 6 7 8    
1   time data
4   time data
currently I'm using for loops to convert it into this structure, though I am wondering if there was a better method?
 
     
     
     
    