© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
T. MailundR 4 Data Science Quick Referencehttps://doi.org/10.1007/978-1-4842-8780-4_7

7. Functional Programming: purrr

Thomas Mailund1  
(1)
Aarhus, Denmark
 

A pipeline-based approach to data processing necessitates a functional programming approach. After all, pipelines are compositions of functions, and loops and variable assignment do not work well with pipelines . You are not precluded from imperative programming, but you need to wrap it in functions.

The package purrr makes functional programming easier. As with the other packages in this book, it will be loaded if you import tidyverse, but you can load it explicitly with
library(purrr)

I will not describe ...

Get R 4 Data Science Quick Reference: A Pocket Guide to APIs, Libraries, and Packages now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.