automatically figure out which packages are broken and need to be re-installed, and also re-install with stdout if the previous installation failed
factor out require(quiet = TRUE)
see if travis_wait works (extend timeout to 20 minutes)
run R CMD javareconf for rJava and see if fixes the jvm-not-found problem
use requireNamespace() instead of require() for a cleaner search path
travis_wait is a function instead of a command
some packages like rgl or tcltk may need virtual framebuffers
run system2(wait = FALSE) to avoid Travis timeouts; I'll write . to stdout every 30 seconds

travis_wait is a function in the top shell environment, which is not available to R here
quiet R CMD check
factor out NeedsCompilation, and we need to check if the package p is in db
autoremove packages
also install texinfo because some packages need to build PDF vignettes
check if done is there every second, and write . after every 30 seconds
make sure p's dependencies are loadable, e.g. shiny is not loadable, because xtable is broken, in which case we need to reinstall xtable instead of shiny
another attempt to make sure all packages are loadable
use the `separate` field to check some packages separately because they are time-consuming
for knitr, the two packages BTYD and R.rsp seem to be very time-consuming
just keep all fields
use update.packages() to ensure R 2.x packages are updated
use the available.packages() database instead