Development Tools

RStudio Desktop User Guide

| Product: RStudio Desktop

Overview

This guide covers the deployment and use of RStudio Desktop on Windows using cloudimg AMIs from the AWS Marketplace. RStudio is an integrated development environment (IDE) for R, a programming language widely used for statistical computing, data analysis, and data visualization.

What's included in this AMI:

  • RStudio Desktop (latest version)
  • R 4.3.3 runtime environment
  • Windows Server with Remote Desktop access
  • Preconfigured desktop environment ready for immediate use
  • 24/7 cloudimg support with guaranteed 24 hour response SLA

Prerequisites

Before launching this AMI, ensure you have:

  1. An active AWS account
  2. An active subscription to the RStudio Desktop listing on AWS Marketplace
  3. An EC2 key pair for password decryption
  4. A Remote Desktop client application (built into Windows, available for macOS and Linux)

Recommended Instance Type: t3.medium (2 vCPU, 4 GB RAM) or larger. The minimum requirements are 1 vCPU, 1 GB RAM, and 30 GB disk space. For data analysis workloads, consider t3.large or m5.large for better performance.

Step 1: Launch the AMI

  1. Navigate to the AWS Marketplace and search for "RStudio cloudimg"
  2. Click Continue to Subscribe, accept the terms, then Continue to Configuration
  3. Select your preferred Region and Software Version
  4. Click Continue to Launch
  5. Choose Launch through EC2 for full control over instance configuration
  6. Select your instance type (t3.medium recommended)
  7. Configure storage: 30 GB gp3 minimum, increase for large datasets
  8. Configure your Security Group with the following inbound rules:
Port Protocol Source Purpose
3389 TCP Your IP Remote Desktop (RDP) access

Important: Restrict RDP access to your IP address only. Do not open port 3389 to 0.0.0.0/0.

  1. Select your EC2 key pair and launch the instance

Step 2: Retrieve the Windows Password

Wait for the EC2 instance to pass 2/2 status checks (this may take several minutes for Windows instances).

  1. Open the AWS Console and navigate to EC2 > Instances
  2. Select your instance
  3. Click Actions > Security > Get Windows password
  4. Click Browse and upload your EC2 key pair .pem file
  5. Click Decrypt password
  6. Note the Username (Administrator) and the decrypted Password

Important: It may take up to 15 minutes after launch before the Windows password is available for decryption. If you see a message that the password is not yet available, wait and try again.

Step 3: Connect via Remote Desktop

Open your Remote Desktop client application:

On Windows: 1. Press Win + R, type mstsc, and press Enter 2. Enter the public IP address of your EC2 instance 3. Click Connect

On macOS: 1. Open Microsoft Remote Desktop 2. Click Add PC 3. Enter the public IP address in the PC name field 4. Click Add 5. Double click the connection to connect

On Linux: 1. Use a client such as Remmina or xfreerdp: bash xfreerdp /v:<public-ip-address> /u:Administrator /p:YOUR_PASSWORD

When prompted for credentials:

  • Username: Administrator
  • Password: The decrypted value from Step 2

If a certificate warning appears, click Continue to proceed.

Step 4: Launch RStudio

Once connected to the Windows desktop, locate the RStudio shortcut icon on the desktop or in the Start menu. Double click to launch RStudio Desktop.

RStudio will open with R 4.3.3 ready to use. You can immediately:

  • Write and execute R scripts
  • Install packages from CRAN
  • Create data visualizations
  • Build R Markdown documents

Getting Started with R in RStudio

Install a package:

In the R console within RStudio, type:

install.packages("tidyverse")

Load a package:

library(tidyverse)

Create a simple plot:

ggplot(mtcars, aes(x = wt, y = mpg)) +
  geom_point() +
  labs(title = "Vehicle Weight vs Fuel Efficiency",
       x = "Weight (1000 lbs)",
       y = "Miles per Gallon")

Read a CSV file:

data <- read.csv("C:/Users/Administrator/Documents/mydata.csv")
head(data)

Server Components

Component Version
RStudio Desktop Latest
R 4.3.3

Filesystem Layout

Drive Description
C:\ System drive with Windows, RStudio, and R installation

Key directories:

Directory Purpose
C:\Program Files\RStudio RStudio installation
C:\Program Files\R\R-4.3.3 R runtime installation
C:\Users\Administrator\Documents Default working directory for R scripts
C:\Users\Administrator\Documents\R\win-library User installed R packages

Transferring Files

Upload files to the instance:

Use the Remote Desktop clipboard to copy and paste small files, or use one of these methods:

  • S3: Upload files to an S3 bucket and download them from the instance using AWS CLI: cmd aws s3 cp s3://your-bucket/data.csv C:\Users\Administrator\Documents\
  • SCP/SFTP: Use WinSCP or similar tool to transfer files over SSH (requires enabling OpenSSH on the instance)
  • Shared drive: Map a network drive if working within a VPC

Troubleshooting

Cannot connect via RDP

  1. Verify the instance has passed 2/2 status checks
  2. Check that your security group allows port 3389 from your IP address
  3. Ensure the Windows password has been generated (wait up to 15 minutes after launch)
  4. Try a different RDP client if your current one is not connecting

RStudio does not launch

  1. Check if R is properly installed: open Command Prompt and type R --version
  2. Try reinstalling RStudio from the original installer if available
  3. Check Windows Event Viewer for application errors

R packages fail to install

  1. Ensure the instance has internet access (public subnet or NAT gateway)
  2. Check available disk space on the C:\ drive
  3. Try running RStudio as Administrator
  4. Some packages require Rtools; install from CRAN if compilation is needed

Remote Desktop session is slow

  1. Reduce the display resolution and color depth in your RDP client settings
  2. Disable desktop composition and visual effects
  3. Consider upgrading to a larger instance type for better performance
  4. Ensure you are connecting from a location with adequate bandwidth

Security Recommendations

  • Change the Administrator password after first login using Ctrl+Alt+End then selecting "Change a password"
  • Restrict RDP access: Only allow port 3389 from your specific IP address
  • Enable Windows Update: Keep the operating system patched with the latest security updates
  • Use strong passwords: Set a complex password for the Administrator account
  • Consider a VPN: For regular access, connect through a VPN rather than exposing RDP directly
  • Enable Windows Firewall: Verify the Windows Firewall is active with appropriate rules
  • Lock the session: Always lock your session (Win + L) when stepping away

Support

If you encounter any issues with this product, contact cloudimg support:

  • Email: support@cloudimg.co.uk
  • Website: www.cloudimg.co.uk
  • Support hours: 24/7 with guaranteed 24 hour response SLA