[R] Need explaining to the ASH code in MASS

Saji Ren
2009-12-10T12:58:29Z

Hi,everyone:

In MASS chapter 5, the codes that yield a ASH for the "duration" data
is read below:

> breaks <- seq(0, 5.9, 0.1)
> counts <- numeric(length(breaks))
> for(i in (0:4)) counts[i+(1:55)] <- counts[i+(1:55)] +
rep(hist(duration, breaks=0.1*i + seq(0, 5.5, 0.5), prob=TRUE,
plot=FALSE)$intensities, rep(5,11))
> plot(breaks+0.05, counts/5, type="l", xlab="duration",
ylab="averaged", bty="n", xlim=c(0, 6), ylim=c(0, 0.7))
> detach()

can anyone explain the third line to me?

Thank you.