I think my internal monologue is stuck with "pipe". In context, x %>% y is "x piped to y". I'm not sure that I could switch to "then", given some old-school BASIC roots, supplemented by an occasional period of VBA programming under duress.
The magrittr (to be pronounced with a sophisticated french accent) is a package with two aims: to decrease development time and to improve readability and maintainability of code. Or even shortr: to make your code smokin' (puff puff)!
This is my favourite form, because it focusses on verbs, not nouns. You can read this series of function compositions like it’s a set of imperative actions. Foo Foo hops, then scoops, then bops. The downside, of course, is that you need to be familiar with the pipe. If you’ve never seen %>% before, you’ll have no idea what this code does. Fortunately, most people pick up the idea very quickly, so when you share you code with others who aren’t familiar with the pipe, you can easily teach them.
The pipe works by performing a “lexical transformation”: behind the scenes, magrittr reassembles the code in the pipe to a form that works by overwriting an intermediate object.
I pronounce it as English pipe during the class (they both in Russian and in English). Sometimes I say word конвейер 'pipeline'. So we borrowed it as pipe and pronounce it in English way. The same word stands for Unix |.
Confusion with “if then” was my first thought as well. I would keep with “pipe”. It’s not a hard concept regardless of what it is called, and should someone later have a question, Googling “r pipe” will be significantly more effect than “r then”
Plus, “pipe” has a nice semantic meaning of its own. It sounds a bit more “physical” and emphasizes what you’re actually doing - plopping the output from the prior step into the first argument of the next functions
Okay, maybe we’re getting bogged down on how to pronounce the pipe in different contexts.
To summarize: The symbol %>% is called the pipe and it pipes data and chains of them are called pipelines. But we can also say it as “then” when reading the code aloud. x %>% sort() %>% round() can be read as take x then sort it then round it.
Same here, although I'm experimenting with introducing %>% as "the pipe operator", and later shortening it to "the pipe." It could be my imagination, but those who hear seem to pick up that "the pipe operator" operates on the things beside it, like, say, the addition operator.
Also, I tend to say "and then" when reading pipelines. Long pipelines should sound like a scene from Dude, Where's my car?
My rationale for not using "and then" (and favoring then) is that sometimes pipelines are lazily evaluated, so it's not a given that the LHS is evaluated before executing the RHS. "And" implies to me that the LHS has been evaluated, while a bare "then" just implies sequence.