compat-map {mlr3misc}R Documentation

Apply Functions in the spirit of 'purrr'

Description

map-like functions, similar to the ones implemented in purrr:

Additionally, the functions map(), imap() and pmap() have type-safe variants with the following suffixes:

Usage

map(.x, .f, ...)

map_lgl(.x, .f, ...)

map_int(.x, .f, ...)

map_dbl(.x, .f, ...)

map_chr(.x, .f, ...)

map_br(.x, .f, ...)

map_bc(.x, .f, ...)

map_dtr(.x, .f, ..., .fill = FALSE, .idcol = NULL)

map_dtc(.x, .f, ...)

pmap(.x, .f, ...)

pmap_lgl(.x, .f, ...)

pmap_int(.x, .f, ...)

pmap_dbl(.x, .f, ...)

pmap_chr(.x, .f, ...)

pmap_dtr(.x, .f, ..., .fill = FALSE, .idcol = NULL)

pmap_dtc(.x, .f, ...)

imap(.x, .f, ...)

imap_lgl(.x, .f, ...)

imap_int(.x, .f, ...)

imap_dbl(.x, .f, ...)

imap_chr(.x, .f, ...)

imap_dtr(.x, .f, ..., .fill = FALSE, .idcol = NULL)

imap_dtc(.x, .f, ...)

keep(.x, .f, ...)

discard(.x, .p, ...)

map_if(.x, .p, .f, ...)

## Default S3 method:
map_if(.x, .p, .f, ...)

map_at(.x, .at, .f, ...)

every(.x, .p, ...)

some(.x, .p, ...)

detect(.x, .p, ...)

walk(.x, .f, ...)

iwalk(.x, .f, ...)

pwalk(.x, .f, ...)

Arguments

.x

(list() | atomic vector()).

.f

(⁠function()⁠ | character() | integer())
Function to apply, or element to extract by name (if .f is character()) or position (if .f is integer()).

...

(any)
Additional arguments passed down to .f or .p.

.fill

(logical(1))
Passed down to data.table::rbindlist().

.idcol

(logical(1))
Passed down to data.table::rbindlist().

.p

(⁠function()⁠ | logical())
Predicate function.

.at

(character() | integer() | logical())
Index vector.


[Package mlr3misc version 0.15.0 Index]