corrected R examples