title: Reorder Samples in Expression Set (R)
body: <p>I'm trying to produce a heatmap of some gene expression data. Currently, the data I'd like to visualize is stored in an expression set data type, but the samples are not grouped correctly; that is, control samples and experimental samples are not grouped together. Here's an abbreviated work flow: </p>
  
  <pre><code>output &lt;- //analysis of raw data eset
  someGenes &lt;- eset [output$Table1, ]
  heatmap(exprs(someGenes))
  </code></pre>
  
  <p>Essentially, I'd like to rearrange the samples in the eset before plotting. I've tried to treat the sample names as "columns" but haven't been able to alter their position within the eset. I'm quite new to R, so any and all help would be greatly appreciated. </p>
  
  <p>Here's a link to the expression set data type for reference: <a href="http://rss.acs.unt.edu/Rdoc/library/Biobase/html/class.ExpressionSet.html" rel="nofollow">http://rss.acs.unt.edu/Rdoc/library/Biobase/html/class.ExpressionSet.html</a></p>
  
  <p>Many thanks. </p>