How to modify my R code to plot this kind of gantt chart?
问题 everybody with the following code in R, I have display a simple gantt chart : dat <- read.csv2(text="start;duration 1;4 7;3 15;2 ") plot(NA, xlim=c(0,20), ylim=c(0,9), ylab="",xlab="X", xaxt="n", yaxt="n") with(dat, segments(x0=start, x1=start+duration, y0=2,y1=2)) with(dat, text( start+duration/2, 2.5, labels=duration)) axis(1, at=seq(0,20,by=2), labels=seq(0,20,by=2)) Now How could I modify this code to be able from these data in a csv file : A; 2; 7; B; 5; 10; C; 5; 12; D; 16; 22; E; 18;