Amazon EC2: Upgrading R
After installing R and Shiny on my EC2 instance I discovered that the default version of R was a little dated and I wanted to update to R 3.2.0. It’s not terribly complicated, but here are the steps I took.
First, become root.
Remove the old version of R.
/etc/apt/sources.list and add the following:
trusty with the name of your Ubuntu version.
Back in the shell, add the public keys.
Update the package list and install the new base R package.
When you launch R you should find that it is the sparkling new version.
Now you will want to update all of the packages too, so launch R (as root) and then do:
If you have packages installed in a user library, you should update those too.
Finally, if you run into memory problems with the package updates, then you’ll need to add a swap file.