Installing R and RStudio so you can code faster. Down below are bash scrips for installing R and RStudio on 16.04 (xenial), 14.04 (trusty), and 12.04 (precise). If you have any questions please feel free to comment below or on my youtube video which explains the code itself.
Ubuntu 16.04 (xenial)
Ubuntu 14.04 (trusty)
Ubuntu 12.04 (precise)
(Optional) If you want to learn about using RStudio, please see this linear regression tutorial.