apply_right.default: Default apply_right implementation.

Description Usage Arguments Value See Also Examples

View source: R/bpipe.R

Description

Default apply_right implementation: S4 dispatch to apply_right_S4.

Usage

1
2
3
4
5
6
7
8
9
## Default S3 method:
apply_right(
  pipe_left_arg,
  pipe_right_arg,
  pipe_environment,
  left_arg_name,
  pipe_string,
  right_arg_name
)

Arguments

pipe_left_arg

left argument

pipe_right_arg

pipe_right_arg argument

pipe_environment

environment to evaluate in

left_arg_name

name, if not NULL name of left argument.

pipe_string

character, name of pipe operator.

right_arg_name

name, if not NULL name of right argument.

Value

result

See Also

apply_left, apply_right, apply_right_S4

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# simulate a function pointer
apply_right.list <- function(pipe_left_arg,
                             pipe_right_arg,
                             pipe_environment,
                             left_arg_name,
                             pipe_string,
                             right_arg_name) {
  pipe_right_arg$f(pipe_left_arg)
}

f <- list(f=sin)
2 %.>% f
f$f <- cos
2 %.>% f

WinVector/wrapr documentation built on Nov. 21, 2020, 8:31 p.m.