Cloud Computing

Fundamentals of Data Science

MTH-361D | Spring 2025 | University of Portland

January 17, 2025

Objectives

Previously…

The guiding principle of data science is the data science life cycle.

The Data Science Life Cycle

The Data Science Life Cycle

R as a Tool for Statistics

Why R?

RStudio, a User-Friendly Interface

What is R Studio?

Integrated Development Environment (IDE): Built specifically for R.

Cross-Platform: Available on Windows, macOS, and Linux.

User-Friendly: Simplifies coding, debugging, and visualizations.

Enhanced Productivity: Tools for managing projects, data, and outputs.

Basic Parts of R Studio

Basic Parts of R Studio

Basic Parts of R Studio

Posit Cloud, a Cloud-Based Solution

What is Posit Cloud?

Why Use Posit Cloud?

How Posit Cloud Works?

Posit Cloud Computing

Posit Cloud Computing

Basic Parts of Posit Cloud

Basic Parts of Posit Cloud

Basic Parts of Posit Cloud

R Studio Working Directory

The Working Directory

The Working Directory

Creating an R Script

An R script is a file with an extension “.R”. It can contain lines of R commands that you can define and run individual lines or run multiple lines.

R Script File Example

R Script File Example

Running R on the Console vs Scripting

Running R Commands in Different Ways

Running R Commands in Different Ways

Mini-Assignment: Create a Simple R Script

  1. Go to this course’s workspace in Posit Cloud and click the R Studio “Project” named Mini-Assignment 1: Create a Simple R Script. This will create a copy for you.

  2. Try rerunning the R script named simple-r-script_example.R.

  3. Create a new R script and save it as my-simple-r-script.R. In your script:

    • Write in your name as a comment.
    • Create 5 single line R commands with comments as labels similar to the example.
  4. Export your R script file, then submit it in Moodle.