I was wondering how to make a simple "loop" to create 21 vertical lines in my plot using "segments()" command?
Specifically, I want the 21 vertical lines to be equally spaced going from 21 consecutive points on the X axis all to 1 on the Y axis. So, for example for the "first vertical line" and the "last "vertical line" the R code is:
m<- seq(0,1,by=.05)
segments(c(0,1),c(0,0),c(0,1),c(1,1),col="red")