Edited R snippets