# spectral analysis
x = dna2vector(sleep1[[1]]$state, alphabet=c('1','2','3','4','5')) # never awake
specenv(na.omit(x), spans=c(3,3), col=5) # not all babies make it to 120 minutes
abline(v=1/60, lty=2, col=8)
mtext(side=1, '1/60', at=1/60, cex=.75)
Run the code above in your browser using DataLab