pipe_into {arpr}R Documentation

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

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


[Package arpr version 0.1.2 Index]