R, RStudio, and Quarto

Carolina Torreblanca

University of Pennsylvania

Global Development: Intermediate Topics in Politics, Policy, and Data

PSCI 3200 - Spring 2026

R and RStudio

Preparedness

You should have…

  • R + RStudio installed
  • Quarto doc rendered and sent to CT
  • GitHub account created and posted to Slack

Motivation: My Story

  • Unconventional path: 4 years at an NGO in Mexico before the PhD
  • All I did was data analysis in R — became very proficient
  • Came to NYU without the typical econ masters background
  • My peers knew the literature, they knew math proofs — but I knew something they didn’t: how to code
  • That skill saved me

Motivation: The Market

  • Data skills remain highly marketable
  • R is free (Stata: $600+/year) and widely used in policy, research, and industry
  • Same workflow at World Bank, think tanks, tech companies

On AI and Coding

  • In the age of GPT and Claude, coding is changing
  • But the mental structure it gives you — how to think about problems — is worth learning
  • My two cents: don’t ask AI to do something you couldn’t do yourself
  • But it’s fine to ask it to do something you could do, just faster or better

Resources

Free, open-source textbook that teaches statistics using R

Support for R:

  • ChatGPT (OpenAI), Claude (Anthropic), Gemini (Google)
  • Stack Overflow

What are R and RStudio?

  • R is a programming language and free computing environment for statistical computing and graphics
  • RStudio is an integrated development environment (IDE) that provides an interface by adding many convenient features and tools
  • Think of R as a car’s engine and RStudio as the dashboard
  • RStudio can also be used to manage projects, produce documents, build websites

Peronalization

  • Customize the appearance of your R IDE by going to Tools -> Global Options -> Appearance

Quarto

  • Quarto integrates code into document production (R, Python, etc.)
  • Useful for producing professional .pdf or .html files, building websites
  • All assignments will require building .html files in Quarto
  • Final project will build a public website presenting an original analysis