Skip to contents

Citations

  • Citation: Wickham ()

Code annotations

library(tidyverse)
library(palmerpenguins)
1penguins |>
2  mutate(
    bill_ratio = bill_depth_mm / bill_length_mm,
    bill_area  = bill_depth_mm * bill_length_mm
  )
1
Take penguins, and then,
2
add new columns for the bill ratio and bill area.

Diagrams

Hard edge

Round edge

Decision

Result one

Result two

HTML widgets

a.txt CHANGEDcontext lines: 5 10 50
@@ -5,12 +5,10 @@
5
5
e
6
6
f
7
7
g
8
8
h
9
9
i
10
- j
11
- k
12
10
l
13
11
m
14
12
n
15
13
o
16
14
p

Keyboard

  • Keyboard shortcut: Shift-Ctrl-P

References

Wickham, Hadley. 2014. “Tidy Data.” Journal of Statistical Software, Articles 59 (10): 1–23. https://doi.org/10.18637/jss.v059.i10.