Added support to R for function.

Tested:

"GNU Emacs 24.3.1 (x86_64-apple-darwin13.2.0, Carbon Version 1.6.0 AppKit 1265.2) of 2014-07-03 on orion"