Learn R Programming

poorman (version 0.2.1)

pipe: Forward-pipe operator

Description

Pipe an object forward into a function or call expression.

Usage

lhs %>% rhs

Arguments

lhs

The result you are piping.

rhs

Where you are piping the result to.

Details

Unlike the magrittr pipe, you must supply an actual function instead of just a function name. For example mtcars %>% head will not work, but mtcars %>% head() will.

Examples

Run this code
# NOT RUN {
mtcars %>% head()
mtcars %>% select(mpg)

# }

Run the code above in your browser using DataLab