Modernize R package installation code