Skip to content

Commit

Permalink
Very rough outline with Sierra tidyverse#915
Browse files Browse the repository at this point in the history
  • Loading branch information
fontikar committed Aug 15, 2024
1 parent d022c4e commit 4a815cb
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions vignettes/purrr.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: "purrr"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{purrr}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
library(purrr)
```

[Big picture]

The purrr package makes applying your functions to multiple elements of a list or data frame easy but you don't need a `for` loop.


### The purrr function families

- `map` apply function mulitple times/ multplie outputs
- `reduce` 1 output
- `predicate` TRUE/FALSE logical output

### `map()`

Detailled map example

### `reduce`()`

Detailled map example

### `predicate`()`

Detailled map example



0 comments on commit 4a815cb

Please sign in to comment.