title: How to plot multiple lines in R
body: <p>I have a data that looks like this:</p>
  
  <pre><code>#d  TRUE    FALSE   Cutoff
  4   28198   0   0.1
  4   28198   0   0.2
  4   28198   0   0.3
  4   28198   13  0.4
  4   28251   611 0.5
  4   28251   611 0.6
  4   28251   611 0.7
  4   28251   611 0.8
  4   28251   611 0.9
  4   28251   611 1
  6   19630   0   0
  6   19630   0   0.1
  6   19630   0   0.2
  6   19630   0   0.3
  6   19630   0   0.4
  6   19636   56  0.5
  6   19636   56  0.6
  6   19636   56  0.7
  6   19636   56  0.8
  6   19636   56  0.9
  6   19636   56  1
  </code></pre>
  
  <p>So I want to plot them based on True (Y-axis) and False (X-axis).</p>
  
  <p>This is the way I want it to appear roughly.
  <img src="https://i.stack.imgur.com/Dvjo3.jpg" alt="This is the way I want it to appear roughly"></p>
  
  <p>What's the right way to do it?
  My code below fails</p>
  
  <pre><code>dat&lt;-read.table("mydat.txt", header=F);
  dis     &lt;- c(4,6);
  linecols &lt;-c("red","blue");
  plot(dat$V2 ~ dat$V3, data = dat,  xlim = c(0,611),ylim =c(0,28251), type="l")
  
  for (i in 1:length(dis)){
  datax &lt;- subset(dat, dat$V1==dis[i], select = c(dat$V2,dat$V3))
  lines(datax,lty=1,type="l",col=linecols[i]);
  }
  </code></pre>