append_object: Appending in a pipe, never unlisting
Description
Append to a given list, while considering as a single object and not unlisting as base::append does.
Argument order is reversed compared to base::append to allow a different pattern of use in a pipe.
Usage
append_object(x, .l, name = NULL)
Value
The list .l with x appended
Arguments
x
Object to append. If the object is a list, then it is appended as-is, and not unlisted.
.l
The list to append to.
Special case handling applies if .l does not exist: then an empty list is used.
This alleviates the need for an initial mylist <- list()