So zeichnen Sie mehrere Linien in R

Ich habe folgende Daten:

#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

Also möchte ich sie basierend auf True (Y-Achse) und False (X-Achse) zeichnen.

So möchte ich, dass es grob aussieht.

Was ist der richtige Weg, um es zu tun? Mein Code unten schlägt fehl

dat<-read.table("mydat.txt", header=F);
dis     <- c(4,6);
linecols <-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 <- subset(dat, dat$V1==dis[i], select = c(dat$V2,dat$V3))
lines(datax,lty=1,type="l",col=linecols[i]);
}

Antworten auf die Frage(2)

Ihre Antwort auf die Frage