Rstats 101
  • Home
  • LLM
  • dplyr
  • tidyr
  • ggplot2
  • Statistics
  • How-To
  • Base R

purrr Tutorials

Learn functional programming with purrr - the tidyverse package for working with functions and vectors. These tutorials cover iteration with map(), reducing lists, error handling, and more.

How to Use keep() and discard() in R

Filter list elements with purrr’s keep() and discard(). Learn to select or remove elements based on predicate functions.

How to Use map() in R

Complete guide to purrr’s map() function for iterating over lists and vectors. Learn functional programming in R with practical examples.

How to Use map2() and pmap() in R

Learn to iterate over multiple lists in parallel with purrr’s map2() and pmap(). Apply functions with 2 or more arguments across corresponding…

How to Use map_dbl(), map_chr(), map_int(), and map_lgl() in R

Learn the typed map variants in purrr that return vectors instead of lists. Simplify your functional programming with map_dbl, map_chr, map_int, and…

How to Use modify() in R

Use purrr’s modify() to transform list elements while preserving the structure and type of the original input. The shape-preserving alternative to…

How to Use reduce() in R

Learn to combine list elements into a single value with purrr’s reduce(). Master accumulating operations, joining data frames, and building complex…

How to Use safely() and possibly() in R

Handle errors gracefully in purrr iterations with safely() and possibly(). Learn to capture errors, provide defaults, and debug failing operations.

How to Use walk() in R

Use purrr’s walk() to iterate over lists for side effects like saving files, printing output, and writing plots without polluting your pipeline.

No matching items

Copyright 2025 Rstats101. All rights reserved.

 
  • About

  • Privacy Policy