title: how to add median value to rows?
body: <p>I have a data frame (data) with 53 columns (ID column plus 52 numeric values).  I can add a column with mean with the following:</p>
  
  <pre><code>data$mean &lt;- rowMeans(data[,2:51],na.rm = TRUE) # add mean of rows
  </code></pre>
  
  <p>But, I cannot do the same for median with the following:</p>
  
  <pre><code>data$medians &lt;- rowMedians(month.sum[,2:51],na.rm = TRUE) # add medians of rows
  </code></pre>
  
  <p>I installed the package <strong>matrixStats</strong> which includes <code>rowMedians</code>, but it does not work for me.</p>