title: How to do a t-test for dependent variable by groups
body: <p>i want to show, if there  is there a significant change in VO2max between the two groups (Experimentalgruppe and Kontrollgruppe).
  Therefor i have to make zwo t-tests (betwenn t0/t1 and t1/t2)  for dependet variables with the following data:</p>
  <pre><code># A tibble: 18 x 4
  group              `t0 VO2 max` `t1 VO2 max` `t2 VO2 max`
  &lt;chr&gt;                     &lt;dbl&gt;        &lt;dbl&gt;        &lt;dbl&gt;
  1 Experimentalgruppe         47.6         47.9         48.7
  2 Kontrollgruppe             47.6         46.5         43.0
  3 Experimentalgruppe         47.6         48.7         48.7
  4 Kontrollgruppe             46.8         47.6         46.2
  5 Kontrollgruppe             44.6         46.2         47.9
  6 Experimentalgruppe         41.3         42.1         42.4
  7 Kontrollgruppe             38           40.7         38.6
  8 Experimentalgruppe         43.5         44.6         42.7
  9 Experimentalgruppe         41.9         43.2         43.8
  10 Kontrollgruppe             45.1         47.9         49.2
  11 Experimentalgruppe         44.1         44.3         44.9
  12 Kontrollgruppe             28.5         30.9         30.3
  13 Kontrollgruppe             38.6         41.6         42.1
  14 Kontrollgruppe             44.6         45.4         47.6
  15 Kontrollgruppe             40.4         43.0         42.4
  16 Experimentalgruppe         32.6         33.3         33.3
  17 Experimentalgruppe         40.4         38.6         43.0
  18 Kontrollgruppe             44.3         40.1         42.7
  </code></pre>
  <p>the dput is here:</p>
  <pre><code>&gt; dput(data)
  structure(list(group = c(&quot;Experimentalgruppe&quot;, &quot;Kontrollgruppe&quot;, 
  &quot;Experimentalgruppe&quot;, &quot;Kontrollgruppe&quot;, &quot;Kontrollgruppe&quot;, &quot;Experimentalgruppe&quot;, 
  &quot;Kontrollgruppe&quot;, &quot;Experimentalgruppe&quot;, &quot;Experimentalgruppe&quot;, 
  &quot;Kontrollgruppe&quot;, &quot;Experimentalgruppe&quot;, &quot;Kontrollgruppe&quot;, &quot;Kontrollgruppe&quot;, 
  &quot;Kontrollgruppe&quot;, &quot;Kontrollgruppe&quot;, &quot;Experimentalgruppe&quot;, &quot;Experimentalgruppe&quot;, 
  &quot;Kontrollgruppe&quot;), `t0 VO2 max` = c(47.6, 47.6, 47.6, 46.7818181818182, 
  44.6, 41.3, 38, 43.5090909090909, 41.8727272727273, 45.1454545454545, 
  44.0545454545455, 28.475, 38.6, 44.6, 40.4, 32.6, 40.4, 44.3272727272727
  ), `t1 VO2 max` = c(47.8727272727273, 46.5090909090909, 48.6909090909091, 
  47.6, 46.2363636363636, 42.1454545454545, 40.7, 44.6, 43.2363636363636, 
  47.8727272727273, 44.3272727272727, 30.9333333333333, 41.6, 45.4181818181818, 
  42.9636363636364, 33.2666666666667, 38.6, 40.1), `t2 VO2 max` = c(48.6909090909091, 
  42.9636363636364, 48.6909090909091, 46.2363636363636, 47.8727272727273, 
  42.4181818181818, 38.6, 42.6909090909091, 43.7818181818182, 49.2363636363636, 
  44.8727272727273, 30.2666666666667, 42.1454545454545, 47.6, 42.4181818181818, 
  33.2666666666667, 42.9636363636364, 42.6909090909091)), row.names = c(NA, 
  -18L), class = c(&quot;tbl_df&quot;, &quot;tbl&quot;, &quot;data.frame&quot;))
  </code></pre>
  <p>As i am pretty new to R, i cant figure out, how to do this.</p>
  <pre><code>t.test(Vo2Max.Auswertung$`t1 VO2 max`, Vo2Max.Auswertung$`t2 VO2 max`, paired = TRUE, alternative = &quot;less&quot;)
  </code></pre>
  <p>This is a working t-test but its not divided into the two groups. Where is my mistake?</p>