Create the file
$HOME/vimfiles/after/ftplugin/r.vim) with the following content:
This file is sourced, after Vims filetype specific file for R is sourced. So it can be used to change settings that are from the R file type plugin or to add other things that you want to do when loading a R file (like define specific mappings etc).
If you only want to change the
formatoptions you could also add the following to your
autocmd FileType r setlocal formatoptions+=r
The added formatoption
Automatically insert the current comment leader after hitting <Enter> in Insert mode.