Modify a vector.
This function merges a list of arguments into a vector. It always returns a list.
modify(.x, ..., .elts = list())
- A vector to modify.
- ..., .elts
- List of elements to merge into
.x. Named elements already existing in
.xare used as replacements. Elements that have new or no names are inserted at the end.
A modified vector upcasted to a list.
modify(c(1, b = 2, 3), 4, b = "foo") x <- list(a = 1, b = 2) y <- list(b = 3, c = 4) modify(x, .elts = y)
Looks like there are no examples yet.