I use the sentence from @GregSnow here with my.symbols function from the TeachingDemo package. Thus, you can do this with a small (ish) piece of code, but you can have quite a lot of control over graphic parameters, such as the size and filling of the clock circles, the type of hands, the way the plot is set, etc. To calculate the location of the arrows, I changed the @agstudy code so that it would extract the minutes correctly.
myd <- data.frame (X = 1:5, Y = c(0.8, 0.6, 0.7, 0.75, 0.1), clockd = c(12.05, 12.25, 12.45, 1.30, 2.1)) hour <- round(myd$clockd)#takes hours by ignoring decimals minute <- 100*(myd$clockd - trunc(myd$clockd,2))#takes decimals #for getting the angle I'm subtracting from pi/2 #thats because pi/2 orients the arrow into 0 degree position, pointing up hourAngle <- pi/2 - (hour/12*2*pi) minuteAngle <- pi/2 - (minute/60*2*pi) #now all the plotting plot(myd$X, myd$Y, type="l", xaxt="n", xlab="", ylab="", xlim=c(0.5,5.5), ylim=c(0,1), col="gray")#standard plot, no x axis axis(1, at=myd$X, labels=myd$X)#custom x-axis require(TeachingDemo) my.symbols(myd$X, myd$Y, ms.arrows, angle=hourAngle, add=T, col="blue", symb.plots=TRUE, adj=0) my.symbols(myd$X, myd$Y, ms.arrows, angle=minuteAngle, add=T, col="red", symb.plots=TRUE, adj=0) my.symbols(myd$X, myd$Y, ms.polygon, n=250, add=T, r=1.1, col="gray")
