R: fixing a couple of examples