Skip to content

Commit

Permalink
Merge pull request #605 from data-edu/ch06/pipe-note
Browse files Browse the repository at this point in the history
Add bit on native pipe
  • Loading branch information
ivelasq authored Feb 1, 2025
2 parents 7245843 + 37365c8 commit 7e3b35a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 06-foundational-skills_2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ It's common in the R programming world to name a package by choosing a word that

In this case, the author of the {magrittr} package created a series of pipe operators and then collected them in a package named after the artist Magritte.

R version 4.1.0 introduced the native pipe operator, `|>`. Like the {magrittr} pipe, it passes an object to a function so that you can chain a sequence of operations together. For straightforward use cases, both pipes behave similarly. However, you may run into differences in more complex scenarios. The code examples in this book use the {magrittr} pipe because it is tightly integrated with the tidyverse.

### Exploring assignment vs. equality

You've learned a couple of operators already: namely the assignment operator (`<-` or `->`) and the pipe operator (`%>%`). Now you'll learn about `=` and `==`.
Expand Down

0 comments on commit 7e3b35a

Please sign in to comment.