r code added to the rest of the R vignette