fseq_methods: Generic methods for fseq manipulations

Description Usage Arguments Examples

Description

When pipelines are created without an initial term, the magrittr package (where the pipes originate) creates a specialised type of function called a fseq. However, magrittr doesn't do much with these fseq objects.

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'fseq'
lhs + rhs

## S3 method for class 'fseq'
length(x)

is.fseq(object)

is_fseq(object)

Arguments

lhs

fseq to be performed first

rhs

fseq to be performed second

x

an fseq object.

object

object to be tested.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
a <- . %>%
  magrittr::add(2) %>%
  magrittr::divide_by(3)
b <- . %>%
  rep(3) %>%
  sum()

(a + b)(2)
(b + a)(2)
length(a)
is.fseq(a)
is.fseq(mean)
is_fseq(a)
is_fseq(mean)

MyKo101/mpipe documentation built on Feb. 6, 2021, 2:13 p.m.