Skip to content
Learn Netverks

Lesson

Step 1/36 3% through track

intro

Introduction to R

Last reviewed May 28, 2026 Content v20260528
Track mode
server_script
Means
Server runner
Reading
~3 min
Level
beginner

This lesson

An orientation to the R track—how the compiled playground works, core vocabulary, and what you will practice next.

You need a clear map of the R track so vectors, data frames, factors, and the tidyverse mindset do not feel like magic.

You will apply Introduction to R in contexts like: Research pipelines, Shiny dashboards, and statistical reporting.

Write R in the editor and click Run on server—the dev runner executes with Rscript; use print() or cat() and base R in playground snippets (tidyverse locally; LEARNING_RUNNER_ENABLED=true). Also read the interview prep blocks.

After basic programming and ideally SQL—pair with Python for ML-heavy roles or stay in R for stats and research pipelines.

How this R track works

  • Rscript in the playground — write runnable scripts; the dev runner executes with Rscript. Use print() or cat() for output—vectors and data.frame() work in base R.
  • Statistics and data analysis focus — this track teaches R syntax, data frames, visualization concepts, and reproducible workflows. Compare scripting patterns with the Python track and SQL querying in the Data Science topic.
  • Prerequisites — finish Python or general programming basics (variables, functions, control flow). SQL helps when you join R analysis with warehouse queries.

Tidyverse packages (dplyr, ggplot2, readr) and R Markdown run locally via install.packages()—playground lessons keep runnable snippets to base R unless noted.

Install on your device (macOS, Linux, Windows)

Install R for statistics and tidyverse work locally.

macOS

  1. brew install r or CRAN macOS installer.
  2. Optional IDE: RStudio Desktop.

Linux

  1. Debian/Ubuntu: sudo apt install -y r-base r-base-dev
  2. Fedora: sudo dnf install -y R

Windows

  1. Installer from CRAN Windows.

Verify: R --version and Rscript --version.

Run code on this site (Backend & language playgrounds)

  1. Clone or open this project locally; copy .env.example to .env.
  2. Ensure LEARNING_RUNNER_ENABLED=true and LEARNING_RUNNER_URL=http://127.0.0.1:9999/v1/execute.
  3. Terminal 1: php artisan serve (or composer run dev for Laravel + Vite + runner together).
  4. Terminal 2: npm run runner — keep it running while you click Run on server.

Install packages locally: install.packages("tidyverse") in R console.

R is a language built for statistics, data analysis, and visualization. Created by statisticians, it centers on vectors, data frames, and reproducible research—making it the default tool in academia, biostatistics, and many analytics teams.

How this track differs from Python and SQL

After the Python track, you know scripting, functions, and data structures. R shares interactive analysis workflows but uses 1-based indexing, vectors everywhere, and data.frame as the tabular workhorse. Compare warehouse querying with the SQL track and broader pipelines in Data Science.

Unlike general-purpose Python, R optimizes for statisticians: built-in modeling, plotting, and package ecosystems like tidyverse install locally with install.packages().

What you will learn

  • Syntax: variables, vectors, factors, control flow, and functions
  • Data: data frames, subsetting, missing values, dplyr/tidyr concepts (local install)
  • Viz: base plotting and ggplot2 grammar (local install)
  • Stats: descriptive summaries, probability, hypothesis tests, linear models
  • Workflow: R Markdown, packages, reproducibility, Shiny teaser

Playground setup

This topic uses server_script: the runner executes scripts with Rscript. Use print() or cat() for output. Runnable snippets stick to base Rvectors and data.frame()—while tidyverse lessons explain local setup.

Important interview questions and answers

  1. Q: What is R best known for?
    A: Statistical computing, data visualization, and reproducible analysis with rich CRAN packages.
  2. Q: Why learn R after Python?
    A: Python excels at general scripting and ML pipelines; R excels at stats-native APIs, academic workflows, and ggplot2—many analysts use both.

Self-check

  1. In one sentence, what is a data frame in R?
  2. Where does SQL fit alongside R analysis?

Tip: Finish Python first—R builds on scripting skills with vectors and data.frame at the center.

Interview prep

What is R in one sentence?

A language for statistical computing and graphics centered on vectors, data frames, and reproducible analysis with CRAN packages.

Why learn R after Python?

Python teaches general scripting; R adds stats-native modeling, factors, and ggplot2 workflows common in analytics and research.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs on the configured server runner (dev: npm run runner with LEARNING_RUNNER_ENABLED=true). Output appears below the editor.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • Why R for stats?
  • Research vs industry goal?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump