title: add column with row wise mean over selected columns using dplyr
body: <p>I have a data frame which contains several variables which got measured at different time points (e.g., <code>test1_tp1</code>, <code>test1_tp2</code>, <code>test1_tp3</code>, <code>test2_tp1</code>, <code>test2_tp2</code>,...).</p>
  
  <p>I am now trying to use <code>dplyr</code> to add a new column to a data frame that calculates the row wise mean over a selection of these columns (e.g., mean over all time points for <code>test1</code>).</p>
  
  <ol>
  <li>I struggle even with the syntax for calculating the mean over explicitly named columns. What I tried without success was:</li>
  </ol>
  
  <p><code>data %&gt;% ... %&gt;% mutate(test1_mean = mean(test1_tp1, test1_tp2, test1_tp3, na.rm = TRUE)</code>   </p>
  
  <ol start="2">
  <li>I would further like to use regex/wildcards to select the column names, so something like</li>
  </ol>
  
  <p><code>data %&gt;% ... %&gt;% mutate(test1_mean = mean(matches("test1_.*"), na.rm = TRUE)</code>    </p>