Updated snippets for R.