RStudio + Stan
RStudio + Stan
by Mauricio “Pacha” Vargas

Version 1.2

OS Ubuntu 18.04

DEVELOPER TOOLS

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 the open source edition of RStudio Server 1.2 that was created to ease using R + Stan. It was created to follow this tutorial by Dr. Andrew Heiss.

Software Included

Getting started after deploying RStudio + Stan

Creating a user account

It is required that you create an administrator account separate from root to use RStudio Server.

With your just created droplet, you can access to the shell from Digital Ocean Control Panel (i.e. from the console link in this image) or by using ssh.

If you want to use ssh (recommended) open a terminal on your local and login as root assuming the IP is 203.0.113.0 (look for the real IP in your control panel):

ssh root@203.0.113.0

Let's create the user paul:

adduser paul

Using RStudio Server

From any modern browser such as Firefox, type 203.0.113.0:8787 (see your droplet IP in 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. If your network has blocked ports, probably you need this method. Run this command from the terminal:

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

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

Additional configurations

If you want to create an administrator and more users, enable https, link your server to yourdomain.com or others, please read the vanilla RStudio instructions.

API Creation

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

As an example, to create a 4GB RStudio + Stan 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":"opentradestatist-rstudiostan-18-04"}' \
      "https://api.digitalocean.com/v2/droplets"
      

Support Details

Supported By:Mauricio “Pacha” Vargas
Hours:09.00 - 18.00
Support URL:https://github.com/tradestatistics/rstudio-server-stan-droplet/issues

More DigitalOcean Links

DigitalOcean Community

Developers supporting developers

Ask a Question

Ask anything related to system administration, programming, devops, open source, or the DigitalOcean platform.

List your 1-Click App in the DigitalOcean Marketplace

Partner with us to build traction for your open source project or software company