title: How to connect dots in ordinary plot based on subject number
body: <p>I am very afraid that I have been trying to invent the hot water, but I would like to connect the dots in the graphs below based on the subject number. In this case the subjects are rats, they are devided in three treatment groups and their weight is measured three times. </p>
  
  <p>Is there a way I can easily connect the dots based on the rat its number?</p>
  
  <p>The data looks like this (first 20 lines):</p>
  
  <pre><code>   Rat Group Measurement Weight
  1    1     1          M0     57
  2    2     1          M0     60
  3    3     1          M0     52
  4    4     1          M0     49
  5    5     1          M0     56
  6    6     1          M0     46
  7    7     1          M0     51
  8    8     1          M0     63
  9    9     1          M0     49
  10  10     1          M0     57
  11  11     2          M0     61
  12  12     2          M0     59
  13  13     2          M0     53
  14  14     2          M0     59
  15  15     2          M0     51
  16  16     2          M0     51
  17  17     2          M0     56
  18  18     2          M0     58
  19  19     2          M0     46
  20  20     2          M0     53
  </code></pre>
  
  <p>And the graph I am talking about is this one:</p>
  
  <p><img src="https://i.stack.imgur.com/0Bk71.jpg" alt="enter image description here"></p>
  
  <p>Which I am making with this code:</p>
  
  <pre><code>par(mfrow=c(1,3))
  plot(data=data_long[data_long$Group==1,], Weight ~ as.numeric(Measurement), 
       ylim=c(0,200), pch=20, xlab="Measurement", main="Treatment group 1")
  par(new=TRUE)
  grid()
  plot(data=data_long[data_long$Group==2,], Weight ~ as.numeric(Measurement), 
       ylim=c(0,200), pch=20, xlab="Measurement", main="Treatment group 2")
  grid()
  plot(data=data_long[data_long$Group==3,], Weight ~ as.numeric(Measurement), 
       ylim=c(0,200), pch=20, xlab="Measurement", main="Treatment group 3")
  grid()
  </code></pre>
  
  <p>How do I ask R to connect the dots based on the rat number? </p>
  
  <p>Thank you!</p>
  
  <p>Edit: requested dput:</p>
  
  <pre><code>structure(list(Rat = 1:20, Group = structure(c(1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L
  ), .Label = c("1", "2", "3"), class = "factor"), Measurement = structure(c(1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L), .Label = c("M0", "M1", "M2", "M3", "M4"), class = "factor"), 
      Weight = c(57L, 60L, 52L, 49L, 56L, 46L, 51L, 63L, 49L, 57L, 
      61L, 59L, 53L, 59L, 51L, 51L, 56L, 58L, 46L, 53L)), .Names = c("Rat", 
  "Group", "Measurement", "Weight"), row.names = c(NA, 20L), class = "data.frame")
  </code></pre>