title: S4 class list to data frame
body: <p>I an new to S4 classes and looked around for a solution but failed :(
  I have a S4 class list, not sure if it is nested list but i want to change it to data frame. My list looks like this named z</p>
  
  <pre><code>head(z)
  [[1]]
  An object of class "AgNode"
  Slot "center":
  x: 1515, y: 2258
  
  Slot "name":
  [1] "hsa:4052"
  
  Slot "txtLabel":
  An object of class "AgTextLabel"
  Slot "labelText":
  [1] "hsa:4052"
  
  Slot "labelLoc":
  x: 0, y: 0
  
  Slot "labelJust":
  [1] "n"
  
  Slot "labelWidth":
  [1] 50
  
  [[2]]
  An object of class "AgNode"
  Slot "center":
  x: 1443, y: 2567
  
  Slot "name":
  [1] "hsa:1311"
  
  Slot "txtLabel":
  An object of class "AgTextLabel"
  </code></pre>
  
  <p>and so on, I want to extract the X and Y values from the center slot and name from the name slot. And put the three in a data frame. How can i do this ?</p>
  
  <pre><code>see&lt;-do.call(cbind, lapply(z, stack))
  </code></pre>
  
  <p>i tried this but it gives an error</p>
  
  <pre><code>Error in as.list.default(x) : 
  no method for coercing this S4 class to a vector
  </code></pre>
  
  <p>can anybody help me ?</p>