Skip to content

Commit 7e3b35a

Browse files
authored
Merge pull request #605 from data-edu/ch06/pipe-note
Add bit on native pipe
2 parents 7245843 + 37365c8 commit 7e3b35a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

06-foundational-skills_2.Rmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,8 @@ It's common in the R programming world to name a package by choosing a word that
608608

609609
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.
610610

611+
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.
612+
611613
### Exploring assignment vs. equality
612614

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

0 commit comments

Comments
 (0)