
# R program to display the observed cane infections in a 10 x 10 grid.

thedata = read.table("scylvFC.txt", header=T)

fact = 10 / K  # to make total display be 10 seconds

thex = thedata$x[(thedata$x<10) & (thedata$y<10)]
they = thedata$y[(thedata$x<10) & (thedata$y<10)]
theS6 = thedata$S6[(thedata$x<10) & (thedata$y<10)]
theS10 = thedata$S10[(thedata$x<10) & (thedata$y<10)]
theS14 = thedata$S14[(thedata$x<10) & (thedata$y<10)]
theS19 = thedata$S19[(thedata$x<10) & (thedata$y<10)]
theS23 = thedata$S23[(thedata$x<10) & (thedata$y<10)]
theS30 = thedata$S30[(thedata$x<10) & (thedata$y<10)]

plot(thex, they, pch="-")
Sys.sleep(6*fact)
points(thex[theS6==1],they[theS6==1], col="red", pch="*")
Sys.sleep(4*fact)
points(thex[theS10==1],they[theS10==1], col="red", pch="*")
Sys.sleep(4*fact)
points(thex[theS14==1],they[theS14==1], col="red", pch="*")
Sys.sleep(5*fact)
points(thex[theS19==1],they[theS19==1], col="red", pch="*")
Sys.sleep(4*fact)
points(thex[theS23==1],they[theS23==1], col="red", pch="*")
Sys.sleep(7*fact)
points(thex[theS30==1],they[theS30==1], col="red", pch="*")

