View source: R/deprec-prepend.R
This function was deprecated in purrr 1.0.0 because it's not related to the core purpose of purrr.
This is a companion to
append() to help merging two
lists or atomic vectors.
prepend() is a clearer semantic
c() that a vector is to be merged at the beginning of
another, especially in a pipe chain.
prepend(x, values, before = NULL)
the vector to be modified.
to be included in the modified vector.
a subscript, before which the values are to be appended. If
A merged vector.
x <- as.list(1:3) x |> append("a") x |> prepend("a") x |> prepend(list("a", "b"), before = 3) prepend(list(), x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.