purrr is a walk() in the park

Foundations of Functional Programming with purrr

Auriel Fournier

Instructor

Why walk()?

short_list <- list(-10, 1, 10)
short_list
[[1]]
[1] -10

[[2]]
[1] 1

[[3]]
[1] 10
walk(short_list, print)
[1] -10
[1] 1
[1] 10
Foundations of Functional Programming with purrr

Plots, the normal way

plist
[[1]]

[[2]]

Scatter plot printed with walk()

Bar plot printed with walk()

Foundations of Functional Programming with purrr

walk() with plots

walk(plist, print)

Scatter plot printed with walk()

Bar plot printed with walk()

Foundations of Functional Programming with purrr

Let's purrr-actice!

Foundations of Functional Programming with purrr

Preparing Video For Download...