An R package for the teaching of statistics