RStudio
RStudio
by Open Trade Statistics

VERSION 1.2

OS Ubuntu 18.04

Create RStudio Droplet

Description

RStudio Server is the premier integrated development environment for R that allows to move computation close to the data and scale compute and RAM centrally.

This is a pre-configured image with open source editions of RStudio Server 1.1. and Shiny Server 1.5. All dependencies are solved for you to just go and use this droplet with already configured tidyverse, shiny, sf and friends.

Software Included

PackageVersionLicense
R3.6GPL-3
openJDK11.0.4GPL-2
OpenBLAS0.2.20BSD-3
TeX Live2018GPL-2
Rstudio Server1.1.463GPL-3
Shiny Server1.5.9.923AGPL-3
shinydashboard0.7.1GPL-3
golem0.1MIT
data.table1.12.2MPL 2.0
tidyverse1.2.1GPL-3
haven2.1.1MIT
jsonlite1.6MIT
readxl1.3.1GPL-3
rvest0.3.4GPL-3
openxlsx4.1.0.1MIT
dbplyr1.4.2MIT
pool0.1.4.2GPL-3
RMariaDB1.0.6GPL-2
RPostgreSQL0.6-2GPL-2
plumber0.4.6MIT
devtools2.1.0GPL-3
roxygen26.1.1GPL-3
testthat2.2.1MIT
doParallel1.0.15GPL-2
rmarkdown1.15GPL-3
bookdown0.1.3GPL-3
pkgdown1.3.0MIT
bookdown6.1.1GPL-3
pacman0.5.1GPL-2
crul0.8.4MIT
pacman0.5.0GPL-2
reprex0.3.0MIT
vcr0.3.0MIT
broom0.5.2MIT
modelr0.1.55GPL-3
sf0.7-7GPL-2
spData0.3.0CC0
here0.1GPL-3
tmap2.3GPL-3
cartography2.2.0GPL-3

Getting started after deploying RStudio

Creating a system administrator account

It is highly recommended that you create an administrator account separate from root.

With your just created droplet, open a terminal on your local and login as root:

ssh root@server_ip_address

Let's create the user paul:

adduser paul
usermod -aG sudo paul

For the full reference please check this DigitalOcean tutorial.

Adding more users

Let's create three users that will only be able to install R packages to their personal directory (and of course to use R, RStudio and Shiny):

adduser john 
adduser george 
adduser ringo

Using RStudio Server

From any modern browser such as Firefox, type server_ip_address:8787 (see your droplet IP at DigitalOcean control panel) on the address bar and then enter with any of the users you created before.

Another option is to access by using an ssh tunnel, with nice benefit of being encrypted. Run this command from the terminal:

ssh -f root@134.209.125.2 -L 8787:134.209.125.2:8787 -N

And then, from the browser go to localhost:8787.

Please notice that the droplet already includes different R packages and full LaTeX installation. The next packages are ready to use and you don't need to re-install them:

  • Databases: RMariaDB and RPostgreSQL
  • Data visualization: ggplot2 and shiny
  • Data wrangling: data.table, dplyr, haven, janitor, jsonlite, lubridate, purrr, readr and tidyr
  • Development: crul, devtools, pacman, packrat and testthat
  • Documentation: bookdown, pkgdown, rmarkdown, roxygen2
  • Parallelization: doParallelOptional: custom domain and enabled httpsLet's say that you want people from your organization access RStudio Server from rstudio.ourcompany.us instead of server_ip_address:8787. DigitalOcean tutorials already covered the additional steps to do that by using Nginx or Apache.

API Creation

In addition to creating a Droplet from the RStudio 1-Click App via the control panel, you can also use the DigitalOcean API.

As an example, to create a 4GB RStudio Droplet in the SFO2 region, you can use the following curl command. You’ll need to either save your API access token to an environment variable or substitute it into the command below.


  curl -X POST -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer '$TOKEN'' -d \
      '{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image":"simplystatistics-rstudio-18-04"}' \
      "https://api.digitalocean.com/v2/droplets"
      

Support Details

Supported By:Open Trade Statistics
Hours:09.00 - 18.00
Support URL:https://github.com/tradestatistics/rstudio-server-droplet/issues
Support Email:contact@tradestatistics.io

Learn More

Product Docs

Technical overviews, how-tos, release notes, and support material

Tutorials

DevOps and development guidelines

API Docs

Run your resources programmatically

Ask a question

Connect, share and learn