title: Why do some Unicode characters display in matrices, but not data frames in R?
body: <p>For at least some cases, Asian characters are printable if they are contained in a <code>matrix</code>, or a <code>vector</code>, but not in a <code>data.frame</code>. Here is an example</p>
  
  <pre><code>q&lt;-'天'
  
  q # Works
  # [1] "天" 
  
  matrix(q) # Works
  #      [,1]
  # [1,] "天"
  
  q2&lt;-data.frame(q,stringsAsFactors=FALSE) 
  q2 # Does not work
  #          q
  # 1 &lt;U+5929&gt;
  
  q2[1,] # Works again.
  # [1] "天"
  </code></pre>
  
  <p>Clearly, my device is capable of displaying the character, but when it is in a <code>data.frame</code>, it does not work. </p>
  
  <p>Doing some digging, I found that the <code>print.data.frame</code> function runs <code>format</code> on each column. It turns out that if you run <code>format.default</code> directly, the same problem occurs:</p>
  
  <pre><code>format(q)
  # "&lt;U+5929&gt;"
  </code></pre>
  
  <p>Digging into <code>format.default</code>, I find that it is calling the internal <code>format</code>, written in C. </p>
  
  <p>Before I dig any further, I want to know if others can reproduce this behaviour. <strong>Is there some configuration of R that would allow me to display these characters within <code>data.frame</code>s?</strong></p>
  
  <p>My <code>sessionInfo()</code>, if it helps:</p>
  
  <pre><code>R version 3.0.1 (2013-05-16)
  Platform: x86_64-w64-mingw32/x64 (64-bit)
  
  locale:
  [1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252   
  [3] LC_MONETARY=English_Canada.1252 LC_NUMERIC=C                   
  [5] LC_TIME=English_Canada.1252    
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  loaded via a namespace (and not attached):
  [1] tools_3.0.1
  </code></pre>