# plot cholestrole values over time for the paper postscript(file="indon.ps", horizontal = F, width=8.5, height=6.5) par(mfrow=c(1,2), pty="s") out <- read.table(file="indon.dat", col.names=c("id", "infect", "intercep", "age", "xero", "cosv", "sinv", "sex", "height", "stunted", "visit", "baseage", "season", "visitsq")) y <- aggregate(out$infect, list(visit=out$visit), mean) barplot(y$x, names=dimnames(y)[[1]], xlab="Order of visit", ylab="Proportion of respiratory infection", cex=0.8) box() y <- aggregate(out$xero, list(visit=out$visit), mean) barplot(y$x, names=dimnames(y)[[1]], xlab="Order of visit", ylab="Proportion of vitamin A deficiency", cex=0.8) box() dev.off()