You might have R and RStudio installed on your computer. Though for some cases it is not enough. Some of these cases are
In those situations it would be terrific to have a spare computer at hand, or cloud!
It is extremely quick (~5 mins) and easy (< 10 lines of code) to set up R and RStudio on Digital Ocean servers with built in Docker.
Digital Ocean (DO) is a virtual private server (VPS) provider, simply your computer on the cloud. You pay by the time you have an open server and by the server’s power (CPU, memory, bandwidth etc.). Though there are two ways of getting free credits; being a student or via referral.
If you are a student, I suggest you take the student pack.
You can get $50 of free credits if you are a student. Just visit the site for details.
If you sign up with referral links, you immediately get $10. Also the referring person will get extra credits if there are any spending on the referred person’s account. Here’s mine below, but any referral link would do.
https://m.do.co/c/9a2de979802b
After you set up your DO account just log in to the panel.
Start creating a droplet by simply clicking on a button.
Step 1
Step 2
Select one click apps tab and Docker.
Step 3
Choose a droplet size. $10/month server will be good enough, but you can go for $20 as well. Remember it is pay as you go, so you will pay only the time droplet is open. It can be 1 minute, 1 hour, 1 day etc.
Step 4 Finalize and Create
Congratulations! Your server will be ready in a minute.
Soon enough you are going to get an email with the instructions to your server. You need to know about your ip and password.
Step 1
Open up Terminal (MacOS/Linux). If you have Windows, you need to download an SSH client such as PuTTy. Alternatively you can use Chrome Web Browser’s extention Secure Shell.
Type ssh root@<YOUR IP ADDRESS>
. Then your password (copy paste it). Once connected, you will need to enter your password again and change it to a new one.
Step 2
Copy paste docker run -d -p 8787:8787 -e USER=rstudio -e PASSWORD=rstudio rocker/tidyverse
to the console. It will simply install R, RStudio, LaTeX and tidyverse related packages.
You will be able to reach web based RStudio on <YOUR IP ADDRESS>:8787
. Just write rstudio to both username and password to log in. You can change the port (8787), username and password by changing the values in the command.