Practice, test 💪
If you don’t practice, you won’t learn anything
Run the code
The windows below run R inside your browser –nothing to install, thanks to WebAssembly and the quarto-live extension. Edit the code, press Run Code, break things, fix them.
Below you can find a familiar exercise from the Plots session:
Your turn
Complete the code to count how many diamonds there are for each cut, from most to least common. If you get stuck, check the hint –and only then the solution.
count() takes the variable you want to tally. arrange(desc(n)) sorts the tally from largest to smallest.
library(dplyr)
diamonds |>
count(cut) |>
arrange(desc(n))Every practice, in one place
Exercises like the one above now live at the end of their own session, next to the material they test. Sessions marked ▶ in-browser run their Basic and Intermediate exercises right on the page, just like this one.
Build with R
- Practice 1: Create a Quarto blog
- Practice 2: Music ▶ in-browser
- Practice 3: Project Gutenberg ▶ in-browser
- Practice 4: Make it move ▶ in-browser
- Practice 5: Map it ▶ in-browser
- Practice 6: Scrape ▶ in-browser
- Practice 7: Shine
- Practice 8: Report yourself
- Practice 9: Map first, parallelize second ▶ in-browser
Work with AI
- Practice 1: Talk back ▶ in-browser
- Practice 2: Ship it
- Practice 3: Retrieve something real ▶ in-browser
- Practice 4: Hand over the keyboard
Think with data
- Embrace the noise – exercises
- There is only one test – exercises
- All models are wrong – exercises
- Draw your assumptions – exercises
- Think Bayes – practice ▶ in-browser