pipe_into: Pipe into specific formal argument

Description Usage Arguments Value Examples

View source: R/magrittr_extensions.R

Description

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

Usage

1
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

1
2
3
require(magrittr)
5L %>%
  pipe_into("digits", format, 2.731234567)

arpr documentation built on Aug. 2, 2021, 5:08 p.m.