Learn R Programming

arpr (version 0.1.2)

pipe_into: Pipe into specific formal argument

Description

This rotates the order of the arguments such that the one named in param_name comes first and then calls the function.

Usage

pipe_into(x, param_name, fun, ...)

Arguments

x

value to be piped into fun

param_name

name of the argument that x should be assigned to

fun

function

...

further arguments for fun

Value

Output of fun.

Examples

Run this code
# NOT RUN {
require(magrittr)
5L %>%
  pipe_into("digits", format, 2.731234567)

# }

Run the code above in your browser using DataLab