added r code to slides