Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

splice

Splice objects and lists of objects into a list


Description

Questioning lifecycle

This splices all arguments into a list. Non-list objects and lists with a S3 class are encapsulated in a list before concatenation.

Usage

splice(...)

Arguments

...

Objects to concatenate.

Value

A list.

Life cycle

splice() is in the questioning lifecycle stage as of purrr 0.3.0. We are now favouring the !!! syntax enabled by rlang::list2().

Examples

inputs <- list(arg1 = "a", arg2 = "b")

# splice() concatenates the elements of inputs with arg3
splice(inputs, arg3 = c("c1", "c2")) %>% str()
list(inputs, arg3 = c("c1", "c2")) %>% str()
c(inputs, arg3 = c("c1", "c2")) %>% str()

purrr

Functional Programming Tools

v0.3.4
GPL-3 | file LICENSE
Authors
Lionel Henry [aut, cre], Hadley Wickham [aut], RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.