Skip to content
Learn Netverks

Lesson

Step 13/36 36% through track

dplyr-basics

dplyr basics (local install)

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

This lesson

This lesson teaches dplyr basics (local install): the syntax, patterns, and safety habits you need before advancing in R.

Data frames are the daily table shape—dplyr verbs mirror SQL but stay in-memory for exploration.

You will apply dplyr basics (local install) in contexts like: Clinical trial tables, survey cleaning, and feature engineering before Python ML.

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).

When you can explain the previous lesson's ideas without copying starter code.

dplyr (tidyverse) provides verbs—filter, select, mutate, summarise, arrange—for readable data manipulation. Install locally: install.packages("dplyr"). The playground uses base R equivalents.

dplyr idioms (local)

library(dplyr)
df |> filter(score >= 90) |> arrange(desc(score))

The pipe (|> base or %>% magrittr) chains steps left-to-right—similar spirit to method chains in pandas.

Base R equivalent (playground)

df_sub <- df[df$score >= 90, ]
df_sub <- df_sub[order(-df_sub$score), ]

Same logic without dplyr—useful when packages are unavailable.

Important interview questions and answers

  1. Q: What does filter() do?
    A: Keeps rows matching conditions—like SQL WHERE or df[mask, ].
  2. Q: Why dplyr locally?
    A: Readable pipelines for analytics teams; playground teaches concepts with base R.

Self-check

  1. What base R syntax filters rows by score >= 90?
  2. Name one dplyr verb for creating new columns.

Tip: Install dplyr locally—playground filters with df[df$score >= 90, ] instead.

Interview prep

filter in base R?

df[df$score >= 90, ] keeps matching rows.

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

  • pipe %>% why?
  • mutate vs transform?

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