magrittr
Improve the readability of R code with the pipe
The magrittr package provides pipe operators for R that allow you to chain function calls together in a left-to-right sequence, making code more readable by replacing nested function calls like h(g(f(x))) with x %>% f %>% g %>% h.
The package eliminates the need for temporary variables and nested parentheses when working with multiple sequential operations. It includes the main pipe operator %>%, a placeholder . for controlling where piped values are passed to functions, the ability to create reusable pipeline functions, and the %$% operator for exposing data frame variables to functions that don’t have a data argument. These features make it straightforward to add, remove, or reorder steps in data processing workflows.
Contributors#
Resources featuring magrittr#
Exploring Positron settings | Isabel Zimmerman & Davis Vaughan | Data Science Lab
The Data Science Lab is a live weekly call. Register at pos.it/dslab! Discord invites go out each week on lives calls. We’d love to have you!
The Lab is an open, messy space for learning and asking questions. Think of it like pair coding with a friend or two. Learn something new, and share what you know to help others grow.
On this call, Libby Heeren is joined by Posit engineers Isabel Zimmerman and Davis Vaughan as they share some of their favorite settings in Positron, a super customizable data science IDE. Come laugh with us as we can’t seem to figure out that VSCode calls rainbow parentheses “bracket pair colorization”
Hosting crew from Posit: Libby Heeren, Isabella Velasquez, Daniel Chen, Isabel Zimmerman, Davis Vaughan
Resources from the hosts and chat: Install Positron: https://positron.posit.co/ Positron docs on keyboard shortcuts: https://positron.posit.co/keyboard-shortcuts.html Nathan Jeffery’s “click to open a .RDS file” keybinding: https://nathan-jeffery.netlify.app/blog/2025-08-26-read-rds-positron/ Positron R pipe setting (paste in browser and it’ll open in Positron): positron://settings/positron.r.pipe One of Dan Chen’s faves, the native tab feature in VSCode + Positron: https://lucasprag.com/posts/underrated-vscode-feature-native-tabs/ The list of RStudio keybindings that you get when you turn on RStudio keybindings in Positron: https://positron.posit.co/migrate-rstudio-keybindings.html Indent rainbow extension: https://open-vsx.org/extension/oderwat/indent-rainbow Rainbow brackets setting (paste in browser and it’ll open in Positron): positron://settings/editor.bracketPairColorization.enabled Setting hierarchy (User vs Workspace settings) in Positron: https://code.visualstudio.com/docs/configure/settings#_settings-precedence Rainbow CSV extension (not by Posit): https://marketplace.visualstudio.com/items?itemName=mechatroner.rainbow-csv Positron +1ePositron, an extension pack for dev and data science, by Garrick Aden-Buie: https://open-vsx.org/extension/grrrck/positron-plus-1-e Publishing from VS Code or Positron: https://docs.posit.co/connect/user/publishing-positron-vscode/ Posit Connect Cloud plans: https://connect.posit.cloud/plans Enter Folder extension that Libby mentions: https://open-vsx.org/extension/xiangda/enter-folder Catppuccin themes (shared by Rory Lawless, and now some of Libby’s favorites!): https://open-vsx.org/extension/Catppuccin/catppuccin-vsc
► Subscribe to Our Channel Here: https://bit.ly/2TzgcOu
Follow Us Here: Website: https://www.posit.co The Lab: https://pos.it/dslab Hangout: https://pos.it/dsh LinkedIn: https://www.linkedin.com/company/posit-software Bluesky: https://bsky.app/profile/posit.co
Thanks for learning with us!
Timestamps 00:00 Introduction 00:42 Guest Introductions: Isabel and Davis 02:41 Positron Settings overview 04:11 How to enable “Format on Save” 04:34 “How do I open settings in JSON or UI?” 05:10 Auto Save on focus change 08:26 Enabling RStudio key bindings 09:28 “Why doesn’t the cursor move with code edits?” 12:18 User vs. Workspace settings 14:34 Creating and using Profiles 16:13 “Can I use the magrittr pipe with Control+Shift+M?” 17:23 Searching and managing keyboard shortcuts 19:42 Creating custom code snippets 21:31 The Indent Rainbow extension 24:04 Enabling rainbow parenthesis/brackets 25:08 Managing Python and R interpreters 26:32 Rearranging and hiding UI panes 28:04 Rainbow CSV and favorite extensions 29:26 Using the Enter Folder extension 31:05 Understanding the setting hierarchy 32:48 Adding symbols to Quick Open search 36:00 “Is there a way to shift focus using keyboard shortcuts?” 38:04 Modifying keybindings JSON for specific languages 39:20 “How do you find trustworthy extensions?” 43:11 “How can I publish to shinyapps.io from Positron?” 44:03 Deploying with Posit Publisher and Connect Cloud 48:32 Customizing themes with RainGlow extension 50:36 “Is there an Import Data Set wizard in Positron?” 53:01 Conclusion and community resources




