What Is the %>% in R

%>% is called the forward pipe operator in R. It provides a mechanism for chaining commands with a new forward-pipe operator, %>%. This operator will forward a value, or the result of an expression, into the next function call/expression.

What does a pipe operator do?

Pipeline operators are responsible for the control of the flow of oil, gas, and other materials sent through pipelines at a power plant or refinery.

How do you make a pipe operator in R?

In R, the pipe operator is, as you have already seen, %>% . If you’re not familiar with F#, you can think of this operator as being similar to the + in a ggplot2 statement.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest