sub-sub-.composer_vector: Apply composition of functions to vector

Description Usage Arguments Examples

Description

It is essentially a wrapper around compose2 with additional feature for easy string manipulation

Usage

1
2
## S3 method for class 'composer_vector'
.x[[.i, .j, ..., .p = TRUE]]

Arguments

.x

a composer_vector

.i

a numeric vector, a character vector, a function or a formula

.j

a numeric vector, a character vector, a function or a formula

...

additional arguments passed to compose2

.p

a logical vector, a numeric vector, a function or a formula

Examples

1
2
3
4
5
6
7
8
9
vec <- co("A: hello there", "B: hi handsome")
vec[[4,-1,.p = 2:3]]
vec[[4,-1,.p = c(TRUE, FALSE)]] # recycled
vec[[4,-1,.p = ~startsWith(.,"A")]]
vec[["h."]]
vec[["(?<=\\s).*(?=\\s)"]]
vec[["e|a|o","X"]]
vec[[toupper]]
vec[[4,-1, ~toupper(.), paste = ";)"]]

moodymudskipper/composer documentation built on May 17, 2019, 3 p.m.