text: user4595: I have a spreadsheet of CPM values
  I want to visualize the top 20 genes expressed across my samples
  This is how my data look like
  > head(b[1:5,1:5])
                   30566-001 - CPM 30566-002 - CPM 30566-003 - CPM 30566-004 - CPM 30566-005 - CPM
  hsa-miR-548ap-3p               0               0               0               0               0
  hsa-miR-548t-3p                0               0               0               0               0
  hsa-miR-548e-3p                0               0               0               0               0
  hsa-miR-548az-3p               0               0               0               0               0
  hsa-miR-548f-3p                0               0               0               0               0
  > dim(b)
  [1] 2632   42
  > 
  
  How I can do that?
  
  user-1: Gene selection is entirely on you and on the question you ask. Most expressed genes would be selected by rowMeans or rowMedians or even rowSums but this is not very informative as digital expression levels (=counts) is influenced by many technical factors and there is (to my knowledge) no direct link to biological relevance.
  Alternatively, you can select by genes that vary a lot between experimental groups. Naively that could be the rowwise variance (rowVars) or standard deviation of the logCPMs (use logscale, otherwise variance is a function of the expression level) or the output of a differential analysis. Ideally plug the raw counts into DESeq2 or similar frameworks. If you only have CPMs then you probably want to feed the logCPMs into limma-trend pipeline, see for a discussion on ways to get going with normalized counts for differential expression in this Bioconductor thread.
  Visualization is then again on you. Either make a heatmap (see for example ComplexHeatmap package) or aggregate the genes into a PCA (see for example PCAtools package at Bioconductor), all mentioned packages contain extensive example code and background information which is fully sufficient to run such an analysis.
  
original_text: 4595: <p>I have a spreadsheet of CPM values</p>
  <p>I want to visualize the top 20 genes expressed across my samples</p>
  <p>This is how my data look like</p>
  <pre><code>&gt; head(b[1:5,1:5])
                   30566-001 - CPM 30566-002 - CPM 30566-003 - CPM 30566-004 - CPM 30566-005 - CPM
  hsa-miR-548ap-3p               0               0               0               0               0
  hsa-miR-548t-3p                0               0               0               0               0
  hsa-miR-548e-3p                0               0               0               0               0
  hsa-miR-548az-3p               0               0               0               0               0
  hsa-miR-548f-3p                0               0               0               0               0
  &gt; dim(b)
  [1] 2632   42
  &gt; 
  </code></pre>
  <p>How I can do that?</p>
   -1: <p>Gene selection is entirely on you and on the question you ask. Most expressed genes would be selected by <code>rowMeans</code> or <code>rowMedians</code> or even <code>rowSums</code> but this is not very informative as digital expression levels (=counts) is influenced by many technical factors and there is (to my knowledge) no direct link to biological relevance.</p>
  <p>Alternatively, you can select by genes that vary a lot between experimental groups. Naively that could be the rowwise variance (<code>rowVars</code>) or standard deviation of the logCPMs (use logscale, otherwise variance is a function of the expression level) or the output of a differential analysis. Ideally plug the raw counts into DESeq2 or similar frameworks. If you only have CPMs then you probably want to feed the logCPMs into limma-trend pipeline, see for a discussion on ways to get going with normalized counts for differential expression in this <a href="https://support.bioconductor.org/p/125144/#125156" rel="nofollow noreferrer">Bioconductor thread</a>.</p>
  <p>Visualization is then again on you. Either make a heatmap (see for example ComplexHeatmap package) or aggregate the genes into a PCA (see for example PCAtools package at Bioconductor), all mentioned packages contain extensive example code and background information which is fully sufficient to run such an analysis.</p>
  