title: Control representation of custom S4 class in matrix
body: <p>If I use a custom class, instantiate it, and add it to a matrix, can I control how the output looks?</p>
  
  <p>For example, I have a class <code>cell</code> I instantiate and add to a matrix. When I <code>show</code> the matrix, it shows up as a questionmark. Can I control how this output looks?</p>
  
  <pre><code>setClass("cell", representation(a="character", b="character"))
  
  setMethod("show", "cell",
            function(object) print(paste(object@a,'|',object@b))
  )
  
  cell1&lt;-
    new("cell", a="hello", b="world")
  
  mat1&lt;-
    matrix(c(cell1))
  
  
  &gt; print(cell1)
  [1] "hello | world"
  &gt; print(mat1)
       [,1]
  [1,] ?  
  </code></pre>