# create the longcat object for Figure 2 in Tueller (2011)
times <- c(1,100,200,300,400,500)
f2lc <- longCat(example2cat, times)
# see the object
summary(f2lc)
# plot the continuous and categogorical versions of this data
par(mfrow=c(1,2), bg='antiquewhite3')
longContPlot(example2cat, times, ylim=c(1,5), main='A', ylab='', xlab='Day')
longCatPlot(f2lc, lwd=4, main='B', colScheme='heat')
par(mfrow=c(1,1), bg='white')
Run the code above in your browser using DataLab